diff --git a/tests/MODULE.bazel b/tests/MODULE.bazel index 04401fdc..bf486486 100644 --- a/tests/MODULE.bazel +++ b/tests/MODULE.bazel @@ -22,7 +22,7 @@ local_path_override( bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "platforms", version = "0.0.10") -bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "rules_cc", version = "0.0.13") bazel_dep(name = "rules_go", version = "0.50.1", repo_name = "io_bazel_rules_go") bazel_dep(name = "rules_rust", version = "0.52.2") bazel_dep(name = "rules_foreign_cc", version = "0.12.0") @@ -179,3 +179,9 @@ llvm.toolchain( exec_arch = "amd64", ) use_repo(llvm, "llvm_toolchain_linux_exec") + +git_override( + module_name = "rules_cc", + remote = "https://github.com/rrbutani/rules_cc", + commit = "55fc267d2f16fcb5ff39bc73bd7a920a72cd25a6", +) diff --git a/toolchain/deps.bzl b/toolchain/deps.bzl index 5c372a45..3fd8d9b1 100644 --- a/toolchain/deps.bzl +++ b/toolchain/deps.bzl @@ -19,11 +19,23 @@ def bazel_toolchain_dependencies(): if not native.existing_rule("rules_cc"): http_archive( name = "rules_cc", - urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"], - sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf", - strip_prefix = "rules_cc-0.0.9", + urls = ["https://github.com/rrbutani/rules_cc/archive/55fc267d2f16fcb5ff39bc73bd7a920a72cd25a6.zip"], + sha256 = "9c265357201c6be302c6fb40cb22bb2f622412d2d9bc6d4293da4d5b010ce7c9", + strip_prefix = "rules_cc-55fc267d2f16fcb5ff39bc73bd7a920a72cd25a6", ) + # Load protobuf if the user has not defined it; this is a dep needed by + # `rules_cc`: https://github.com/bazelbuild/rules_cc/blob/55fc267d2f16fcb5ff39bc73bd7a920a72cd25a6/WORKSPACE#L45-L50 + if not native.existing_rule("protobuf"): + http_archive( + name = "protobuf", + sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa", + strip_prefix = "protobuf-27.0", + url = "https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protobuf-27.0.tar.gz", + ) + + + # Load bazel_skylib if the user has not defined them. if not native.existing_rule("bazel_skylib"): http_archive(