Fix util/bazel-example under Bazel 9.0.0rc1
We need to explicitly import rules_cc. See
https://github.com/bazelbuild/bazel-central-registry/issues/6402
Change-Id: I648dd64fb2a6c21264dd9d664643ec76cd3a297a
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/83567
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Lily Chen <chlily@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Lily Chen <chlily@google.com>
diff --git a/MODULE.bazel b/MODULE.bazel
index 4532c8b..ce43500 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -23,6 +23,8 @@
# Periodically update the following dependencies to their latest versions
# listed on https://registry.bazel.build/. When doing so, run
# `bazelisk test ...` to update the hashes in MODULE.bazel.lock.
+#
+# Similarly update the dependencies in util/bazel-example/MODULE.bazel
# In principle, googletest is only needed for tests and could be a
# dev_dependency. But it would then be impossible for downstream modules to run
diff --git a/util/bazel-example/BUILD.bazel b/util/bazel-example/BUILD.bazel
index 1c28855..2bf5988 100644
--- a/util/bazel-example/BUILD.bazel
+++ b/util/bazel-example/BUILD.bazel
@@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+load("@rules_cc//cc:defs.bzl", "cc_binary")
+
cc_binary(
name = "example",
srcs = ["example.cc"],
diff --git a/util/bazel-example/MODULE.bazel b/util/bazel-example/MODULE.bazel
index dda818d..1f6e688 100644
--- a/util/bazel-example/MODULE.bazel
+++ b/util/bazel-example/MODULE.bazel
@@ -14,6 +14,8 @@
module(name = "bazel-example")
+bazel_dep(name = "rules_cc", version = "0.2.8")
+
bazel_dep(name = "boringssl")
local_path_override(
module_name = "boringssl",