Skip to content

Commit

Permalink
Fix #10007: Propagate msvc-style link flags to clang-cl with Bazel
Browse files Browse the repository at this point in the history
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: 630590450
  • Loading branch information
yukawa authored and copybara-github committed May 6, 2024
1 parent 4c8da99 commit 4145e25
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion build_defs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down

0 comments on commit 4145e25

Please sign in to comment.