From 062085abdf6c5dbb80fb873e83dd83e9d3191fe1 Mon Sep 17 00:00:00 2001 From: Highway Date: Mon, 3 Mar 2025 06:51:28 -0800 Subject: [PATCH] Fix constraint_values for Windows MSVC. PiperOrigin-RevId: 732906253 --- BUILD | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/BUILD b/BUILD index db54b98c96..856a7abd79 100644 --- a/BUILD +++ b/BUILD @@ -33,26 +33,8 @@ config_setting( ) config_setting( - name = "compiler_msvc_actual", - flag_values = {"@bazel_tools//tools/cpp:compiler": "msvc"}, -) - -# The above is insufficient for Bazel on Windows, which does not seem to -# detect/set a compiler flag. This workaround prevents compile errors due to -# passing clang-only warning flags to MSVC. -config_setting( - name = "compiler_msvc_cpu", - values = { - "cpu": "x64_windows", - }, -) - -selects.config_setting_group( name = "compiler_msvc", - match_any = [ - ":compiler_msvc_actual", - ":compiler_msvc_cpu", - ], + flag_values = {"@bazel_tools//tools/cpp:compiler": "msvc-cl"}, ) config_setting(