Skip to content

Commit

Permalink
Select the correct toolchain for Windows arm64 after enabling cc tool…
Browse files Browse the repository at this point in the history
…chain resolution.

PiperOrigin-RevId: 555413912
Change-Id: I3ccc0d51973849aaa891dd0944a00432ce3d2cfb
  • Loading branch information
meteorcloudy authored and copybara-github committed Aug 10, 2023
1 parent 9997b3d commit 138f06f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .bazelci/build_bazel_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ platforms:
- "--host_copt=-w"
- "-c"
- "opt"
- "--cpu=x64_arm64_windows"
- "--incompatible_enable_cc_toolchain_resolution"
- "--config=windows_arm64"
build_targets:
- "//src:bazel.exe"
- "//src:bazel_nojdk.exe"
3 changes: 3 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ build:macos --macos_minimum_os=10.11
# Therefore, use the local detected Python toolchain on Windows.
build:windows --extra_toolchains=@bazel_tools//tools/python:autodetecting_toolchain

build:windows_arm64 --platforms=//:windows_arm64
build:windows_arm64 --extra_toolchains=@local_config_cc//:cc-toolchain-arm64_windows

# Enable Bzlmod
build:bzlmod --enable_bzlmod
build:bzlmod --check_direct_dependencies=error
Expand Down
8 changes: 8 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,14 @@ platform(
parents = ["@local_config_platform//:host"],
)

platform(
name = "windows_arm64",
constraint_values = [
"@platforms//os:windows",
"@platforms//cpu:arm64",
],
)

REMOTE_PLATFORMS = ("rbe_ubuntu1804_java11",)

[
Expand Down

0 comments on commit 138f06f

Please sign in to comment.