googletest/googletest_deps.bzl
Derek Mauro 5a9c3f9e8d Upgrade most builds to use Bazel 9.0.0
Keep one build on 8.5.1 to test WORKSPACE

Fixes the -Wdeprecated-declaration warnings
enabled by default in Bazel 9 that come from the
single-arg Invoke().

Fixes the new -Winconsistent-missing-override that
we intentionally use in a test.

Upgrades RE2 to a version compatible with Bazel 9.

PiperOrigin-RevId: 865966282
Change-Id: I5f7c3b60daf5f8a90be08004d96aaa59611e35c4
2026-02-05 08:42:50 -08:00

45 lines
1.8 KiB
Python

"""Load dependencies needed to use the googletest library as a 3rd-party consumer."""
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("//:fake_fuchsia_sdk.bzl", "fake_fuchsia_sdk")
def googletest_deps():
"""Loads common dependencies needed to use the googletest library."""
if not native.existing_rule("re2"):
http_archive(
name = "re2",
sha256 = "87f6029d2f6de8aa023654240a03ada90e876ce9a4676e258dd01ea4c26ffd67",
strip_prefix = "re2-2025-11-05",
urls = ["https://github.com/google/re2/releases/download/2025-11-05/re2-2025-11-05.tar.gz"],
)
if not native.existing_rule("abseil-cpp"):
http_archive(
name = "abseil-cpp",
sha256 = "4c124408da902be896a2f368042729655709db5e3004ec99f57e3e14439bc1b2",
strip_prefix = "abseil-cpp-20260107.0",
urls = ["https://github.com/abseil/abseil-cpp/releases/download/20260107.0/abseil-cpp-20260107.0.tar.gz"],
)
if not native.existing_rule("bazel_features"):
http_archive(
name = "bazel_features",
sha256 = "9390b391a68d3b24aef7966bce8556d28003fe3f022a5008efc7807e8acaaf1a",
strip_prefix = "bazel_features-1.36.0",
url = "https://github.com/bazel-contrib/bazel_features/releases/download/v1.36.0/bazel_features-v1.36.0.tar.gz",
)
if not native.existing_rule("rules_cc"):
http_archive(
name = "rules_cc",
sha256 = "207ea073dd20a705f9e8bc5ac02f5203e9621fc672774bb1a0935aefab7aebfa",
strip_prefix = "rules_cc-0.2.8",
url = "https://github.com/bazelbuild/rules_cc/releases/download/0.2.8/rules_cc-0.2.8.tar.gz",
)
if not native.existing_rule("fuchsia_sdk"):
fake_fuchsia_sdk(
name = "fuchsia_sdk",
)