Fix rules_cc_BUILD.windows.tpl.patch (#1196)

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]: 76343ffa70
 [2]: c523a3b998
 [3]: https://github.com/google/copybara

PiperOrigin-RevId: 730872628
This commit is contained in:
Yohei Yukawa
2025-02-26 15:34:14 +09:00
committed by GitHub
parent a924c05f2e
commit 9891b5892e

View File

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