Skip to content

Commit 55592a2

Browse files
yukawacopybara-github
authored andcommitted
Fix #10007: Propagate msvc-style link flags to clang-cl with Bazel
The idea here is to set the existing config "config_msvc" not only when "msvc-cl" is specified but also when "clang-cl" is specified. Keep in mind that clang-cl support in protobuf remains to be only best-effort and untested for now. PiperOrigin-RevId: 631195504
1 parent 4c8da99 commit 55592a2

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

build_defs/BUILD.bazel

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,24 @@ package(
1414
)
1515

1616
create_compiler_config_setting(
17-
name = "config_msvc",
17+
name = "config_msvc_cl",
1818
value = "msvc-cl",
1919
)
2020

21+
# Caveat: clang-cl support in protobuf is only best-effort / untested for now.
22+
create_compiler_config_setting(
23+
name = "config_clang_cl",
24+
value = "clang-cl",
25+
)
26+
27+
selects.config_setting_group(
28+
name = "config_msvc",
29+
match_any = [
30+
":config_clang_cl",
31+
":config_msvc_cl",
32+
],
33+
)
34+
2135
config_setting(
2236
name = "aarch64",
2337
values = {"cpu": "linux-aarch_64"},

0 commit comments

Comments
 (0)