summaryrefslogtreecommitdiff
path: root/absl/BUILD.bazel
diff options
context:
space:
mode:
authorGravatar Derek Mauro <dmauro@google.com>2022-09-08 13:26:39 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2022-09-08 13:27:23 -0700
commit5b01512e94e82bf111df3968784c9508e576a4da (patch)
treee7f91e4900a24243f7faeb9824806d3f3b51e4d9 /absl/BUILD.bazel
parent2594f855145255e2c0e21f423e6a1149f2055962 (diff)
Add a case to detect when the Bazel compiler string is explicitly set to "gcc",
instead of just detecting Bazel's default "compiler" string. When Bazel auto-configures GCC, it sets the compiler string to "compiler", probably for backwards compatibility. Some users manually set the string to "gcc". This should address the backwards compatibility issues described in https://github.com/bazelbuild/bazel/issues/12707 and hopefully fix https://github.com/abseil/abseil-cpp/issues/1263 PiperOrigin-RevId: 473069817 Change-Id: I8a24721f63f9d61447b22b3b05b06a9dde7d34d8
Diffstat (limited to 'absl/BUILD.bazel')
-rw-r--r--absl/BUILD.bazel8
1 files changed, 8 insertions, 0 deletions
diff --git a/absl/BUILD.bazel b/absl/BUILD.bazel
index 7cccbbba..29963ccc 100644
--- a/absl/BUILD.bazel
+++ b/absl/BUILD.bazel
@@ -28,6 +28,14 @@ config_setting(
)
config_setting(
+ name = "gcc_compiler",
+ flag_values = {
+ "@bazel_tools//tools/cpp:compiler": "gcc",
+ },
+ visibility = [":__subpackages__"],
+)
+
+config_setting(
name = "msvc_compiler",
flag_values = {
"@bazel_tools//tools/cpp:compiler": "msvc-cl",