From bd92b64b2d4d265d9e451834f4ab7b8d66c1ae0e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 21:32:56 +0000 Subject: [PATCH 1/3] chore(deps): update dependency rules_cc to v0.0.13 --- tests/MODULE.bazel | 2 +- toolchain/deps.bzl | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/MODULE.bazel b/tests/MODULE.bazel index 04401fdc..ca763b8a 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") diff --git a/toolchain/deps.bzl b/toolchain/deps.bzl index 5c372a45..780fb12f 100644 --- a/toolchain/deps.bzl +++ b/toolchain/deps.bzl @@ -19,9 +19,9 @@ 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/bazelbuild/rules_cc/releases/download/0.0.13/rules_cc-0.0.13.tar.gz"], + sha256 = "d9bdd3ec66b6871456ec9c965809f43a0901e692d754885e89293807762d3d80", + strip_prefix = "rules_cc-0.0.13", ) # Load bazel_skylib if the user has not defined them. From f1c48961abde400bda828149627a4a3fca6a0d2d Mon Sep 17 00:00:00 2001 From: Rahul Butani Date: Fri, 11 Oct 2024 14:33:05 -0700 Subject: [PATCH 2/3] [DO NOT MERGE] test rules_cc patch --- tests/MODULE.bazel | 6 ++++++ toolchain/deps.bzl | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/MODULE.bazel b/tests/MODULE.bazel index ca763b8a..bf486486 100644 --- a/tests/MODULE.bazel +++ b/tests/MODULE.bazel @@ -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 780fb12f..954a6314 100644 --- a/toolchain/deps.bzl +++ b/toolchain/deps.bzl @@ -19,9 +19,9 @@ 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.13/rules_cc-0.0.13.tar.gz"], - sha256 = "d9bdd3ec66b6871456ec9c965809f43a0901e692d754885e89293807762d3d80", - strip_prefix = "rules_cc-0.0.13", + urls = ["https://github.com/rrbutani/rules_cc/archive/55fc267d2f16fcb5ff39bc73bd7a920a72cd25a6.zip"], + sha256 = "9c265357201c6be302c6fb40cb22bb2f622412d2d9bc6d4293da4d5b010ce7c9", + strip_prefix = "rules_cc-55fc267d2f16fcb5ff39bc73bd7a920a72cd25a6", ) # Load bazel_skylib if the user has not defined them. From 329bde6de6548627e39c9a13c958896506eba816 Mon Sep 17 00:00:00 2001 From: Rahul Butani Date: Fri, 11 Oct 2024 14:48:27 -0700 Subject: [PATCH 3/3] deps: add `protobuf` to deps, needed by `rules_cc` 0.0.13 --- toolchain/deps.bzl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/toolchain/deps.bzl b/toolchain/deps.bzl index 954a6314..3fd8d9b1 100644 --- a/toolchain/deps.bzl +++ b/toolchain/deps.bzl @@ -24,6 +24,18 @@ def bazel_toolchain_dependencies(): 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(