Skip to content

Commit 50b8600

Browse files
derekmaurocopybara-github
authored andcommitted
Add rules_cc dependency, required by Bazel going forward
This also adds the dependencies of rules_cc to WORKSPACE. bzlmod automatically pulls in dependencies. skylib is removed as it is pulled in by a deps function. PiperOrigin-RevId: 808659470 Change-Id: Idc41cad7b05019793d4a1898bdb80bc4797da5cf
1 parent 0934b7e commit 50b8600

File tree

6 files changed

+31
-6
lines changed

6 files changed

+31
-6
lines changed

BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#
3131
# Bazel Build for Google C++ Testing Framework(Google Test)
3232

33+
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
34+
3335
package(default_visibility = ["//visibility:public"])
3436

3537
licenses(["notice"])

MODULE.bazel

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ bazel_dep(
5252
version = "2024-07-02.bcr.1",
5353
)
5454

55+
bazel_dep(
56+
name = "rules_cc",
57+
version = "0.2.8"
58+
)
59+
5560
bazel_dep(
5661
name = "rules_python",
5762
version = "1.3.0",

WORKSPACE

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ http_archive(
4545
load("@rules_python//python:repositories.bzl", "py_repositories")
4646
py_repositories()
4747

48-
http_archive(
49-
name = "bazel_skylib",
50-
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
51-
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz"],
52-
)
53-
5448
http_archive(
5549
name = "platforms",
5650
urls = [
@@ -59,3 +53,9 @@ http_archive(
5953
],
6054
sha256 = "29742e87275809b5e598dc2f04d86960cc7a55b3067d97221c9abbc9926bff0f",
6155
)
56+
57+
load("@bazel_features//:deps.bzl", "bazel_features_deps")
58+
bazel_features_deps()
59+
60+
load("@rules_cc//cc:extensions.bzl", "compatibility_proxy_repo")
61+
compatibility_proxy_repo()

googlemock/test/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#
3131
# Bazel Build for Google C++ Testing Framework(Google Test)-googlemock
3232

33+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test")
3334
load("@rules_python//python:defs.bzl", "py_library", "py_test")
3435

3536
licenses(["notice"])

googletest/test/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#
3131
# Bazel BUILD for The Google C++ Testing Framework (Google Test)
3232

33+
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_test")
3334
load("@rules_python//python:defs.bzl", "py_library", "py_test")
3435

3536
licenses(["notice"])

googletest_deps.bzl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@ def googletest_deps():
2222
urls = ["https://github.com/abseil/abseil-cpp/releases/download/20250814.0/abseil-cpp-20250814.0.tar.gz"],
2323
)
2424

25+
if not native.existing_rule("bazel_features"):
26+
http_archive(
27+
name = "bazel_features",
28+
sha256 = "9390b391a68d3b24aef7966bce8556d28003fe3f022a5008efc7807e8acaaf1a",
29+
strip_prefix = "bazel_features-1.36.0",
30+
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.36.0/bazel_features-v1.36.0.tar.gz",
31+
)
32+
33+
if not native.existing_rule("rules_cc"):
34+
http_archive(
35+
name = "rules_cc",
36+
sha256 = "207ea073dd20a705f9e8bc5ac02f5203e9621fc672774bb1a0935aefab7aebfa",
37+
strip_prefix = "rules_cc-0.2.8",
38+
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.8/rules_cc-0.2.8.tar.gz",
39+
)
40+
2541
if not native.existing_rule("fuchsia_sdk"):
2642
fake_fuchsia_sdk(
2743
name = "fuchsia_sdk",

0 commit comments

Comments
 (0)