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
pull/16741/head
Yohei Yukawa 2024-05-06 14:59:55 -07:00 committed by Copybara-Service
parent 4c8da99c48
commit 55592a28e7
1 changed files with 15 additions and 1 deletions

View File

@ -14,10 +14,24 @@ package(
)
create_compiler_config_setting(
name = "config_msvc",
name = "config_msvc_cl",
value = "msvc-cl",
)
# Caveat: clang-cl support in protobuf is only best-effort / untested for now.
create_compiler_config_setting(
name = "config_clang_cl",
value = "clang-cl",
)
selects.config_setting_group(
name = "config_msvc",
match_any = [
":config_clang_cl",
":config_msvc_cl",
],
)
config_setting(
name = "aarch64",
values = {"cpu": "linux-aarch_64"},