From 5c57f232d8fb084627a6ef1a01d7eac25fdd9d10 Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Tue, 24 Feb 2026 18:56:43 +0100 Subject: [PATCH] Recognize `clang` targeting Windows as "MinGW like" This is necessary to get abseil to build with https://github.com/cerisier/toolchains_llvm_bootstrapped. The old mappings for MinGW are arguably not semantically correct as MinGW is the runtime/sysroot, not the compiler, but are left in place for backwards compatibility. --- absl/BUILD.bazel | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/absl/BUILD.bazel b/absl/BUILD.bazel index 2a25ac64559..43714ad3c53 100644 --- a/absl/BUILD.bazel +++ b/absl/BUILD.bazel @@ -52,11 +52,23 @@ config_setting( visibility = [":__subpackages__"], ) +config_setting( + name = "windows-clang", + constraint_values = [ + "@platforms//os:windows", + ], + flag_values = { + "@bazel_tools//tools/cpp:compiler": "clang", + }, + visibility = [":__subpackages__"], +) + selects.config_setting_group( name = "mingw_compiler", match_any = [ ":mingw_unspecified_compiler", ":mingw-gcc_compiler", + ":windows-clang", ], visibility = [":__subpackages__"], )