Skip to content

Commit

Permalink
Fix rules_cc_BUILD.windows.tpl.patch (#1196)
Browse files Browse the repository at this point in the history
This follows up to my previous commit [1], which introduced several
patches to 'rules_cc' including

  bazel/rules_cc_BUILD.windows.tpl.patch

to support 'clang-cl' (#1179).

Seems that a subsequent commit [2] unexpectedly replacing '@platforms//'
with '//third_party/bazel_platforms' probably because of some issue in
copybara rewrite rules. This commit restores the above file to the
original state to fix Windows Bazel build.

 [1]: 76343ff
 [2]: c523a3b
 [3]: https://github.com/google/copybara

PiperOrigin-RevId: 730872628
  • Loading branch information
yukawa authored Feb 26, 2025
1 parent a924c05 commit 9891b58
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/bazel/rules_cc_BUILD.windows.tpl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@
+toolchain(
+ name = "cc-toolchain-x64_x86_windows-clang-cl",
+ exec_compatible_with = [
+ "//third_party/bazel_platforms/cpu:x86_64",
+ "//third_party/bazel_platforms/os:windows",
+ "@platforms//cpu:x86_64",
+ "@platforms//os:windows",
+ "@rules_cc//cc/private/toolchain:clang-cl",
+ ],
+ target_compatible_with = [
+ "//third_party/bazel_platforms/cpu:x86_32",
+ "//third_party/bazel_platforms/os:windows",
+ "@platforms//cpu:x86_32",
+ "@platforms//os:windows",
+ ],
+ toolchain = ":cc-compiler-x64_x86_windows-clang-cl",
+ toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
Expand Down

0 comments on commit 9891b58

Please sign in to comment.