Using bzlmod with Bazel 6 or later:
-
[Bazel 6] Add
common --enable_bzlmod
to.bazelrc
. -
Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_cc", version = "0.2.1")
Using WORKSPACE:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_cc",
sha256 = "92fed78a5a310f86c060dcaed20f396ef0198cc3d46a46fdea7c469042cf02ce",
strip_prefix = "rules_cc-0.2.1",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.1/rules_cc-0.2.1.tar.gz",
)
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
compatibility_proxy_repo()
Full Changelog: 0.2.0...0.2.1