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: 631195504
  • Loading branch information
yukawa authored and copybara-github committed May 6, 2024
1 parent 4c8da99 commit 55592a2
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",

This comment has been minimized.

Copy link
@pullenmils35

pullenmils35 Oct 15, 2024

put brackets around "config_msvc" it makes it not a open file sourcing out to find what it needs to confirm name. where as config_msvc_cl is a secondary file that can source out till coming to conclusion

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"},

This comment has been minimized.

Copy link
@pullenmils35

pullenmils35 Oct 15, 2024

isn't there an extra a in aarch so its saving it to two singular original files? DNS copy?

Expand Down

0 comments on commit 55592a2

Please sign in to comment.