summaryrefslogtreecommitdiffstats
path: root/BUILD.bazel
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2024-02-27 19:53:48 (GMT)
committerCopybara-Service <copybara-worker@google.com>2024-02-27 19:54:30 (GMT)
commit3b6d48e8d5c1d9b3f9f10ac030a94008bfaf032b (patch)
tree5a16f98160677e830ece5a144aae665d16e365aa /BUILD.bazel
parent814ba36338ae48b6066cd797a4fde84aaeacc4db (diff)
downloadgoogletest-3b6d48e8d5c1d9b3f9f10ac030a94008bfaf032b.zip
googletest-3b6d48e8d5c1d9b3f9f10ac030a94008bfaf032b.tar.gz
googletest-3b6d48e8d5c1d9b3f9f10ac030a94008bfaf032b.tar.bz2
Reland https://github.com/google/googletest/commit/9756ee7cbaef1b6652065616ab832810a6032bbf
Since Fuchsia engineers rarely work within this repo, initialize a lightweight fake @fuchsia_sdk repo rather than distributing the Fuchsia SDK here. Tested locally via `bazel query --[no]enable_bzlmod "deps(set(//googletest/test:gtest_all_test))"` (#4472) PiperOrigin-RevId: 610826859 Change-Id: I7d41b1dbe9e7f133fe535d7337dc5bff5bf97d3a
Diffstat (limited to 'BUILD.bazel')
-rw-r--r--BUILD.bazel17
1 files changed, 17 insertions, 0 deletions
diff --git a/BUILD.bazel b/BUILD.bazel
index b1e3b7f..e407ae2 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -56,6 +56,12 @@ config_setting(
constraint_values = ["@platforms//os:openbsd"],
)
+# NOTE: Fuchsia is not an officially supported platform.
+config_setting(
+ name = "fuchsia",
+ constraint_values = ["@platforms//os:fuchsia"],
+)
+
config_setting(
name = "msvc_compiler",
flag_values = {
@@ -147,6 +153,17 @@ cc_library(
"@com_googlesource_code_re2//:re2",
],
"//conditions:default": [],
+ }) + select({
+ # `gtest-death-test.cc` has `EXPECT_DEATH` that spawns a process,
+ # expects it to crash and inspects its logs with the given matcher,
+ # so that's why these libraries are needed.
+ # Otherwise, builds targeting Fuchsia would fail to compile.
+ ":fuchsia": [
+ "@fuchsia_sdk//pkg/fdio",
+ "@fuchsia_sdk//pkg/syslog",
+ "@fuchsia_sdk//pkg/zx",
+ ],
+ "//conditions:default": [],
}),
)