From 9891b5892e0a85098c7103cb94d207972c9a8e16 Mon Sep 17 00:00:00 2001 From: Yohei Yukawa Date: Wed, 26 Feb 2025 15:34:14 +0900 Subject: [PATCH] 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]: 76343ffa704021a10ee6deec7d887d1c1e0f472b [2]: c523a3b998e9edaf0822a52e468d79f2233bb125 [3]: https://github.com/google/copybara PiperOrigin-RevId: 730872628 --- src/bazel/rules_cc_BUILD.windows.tpl.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bazel/rules_cc_BUILD.windows.tpl.patch b/src/bazel/rules_cc_BUILD.windows.tpl.patch index 8f062cd17..6a308b60d 100644 --- a/src/bazel/rules_cc_BUILD.windows.tpl.patch +++ b/src/bazel/rules_cc_BUILD.windows.tpl.patch @@ -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",