Skip to content

Commit

Permalink
[6.4.0] Cherry-pick commits to fix a Windows issue (bazelbuild#19232)
Browse files Browse the repository at this point in the history
Cherry-picked three commits
(bazelbuild@138f06f
,
bazelbuild@d0de5e0
and
bazelbuild@5647b26)
to fix a Windows issue.

1.Disable using NEON instructions on Windows arm64

Commit
bazelbuild@d0de5e0

PiperOrigin-RevId: 555467146
Change-Id: Ib34811467d7f0f6980bfa4976b8d1ba2fb041b16


2.Select the correct toolchain for Windows arm64 after enabling cc tool…

Commit
bazelbuild@138f06f

PiperOrigin-RevId: 555413912
Change-Id: I3ccc0d51973849aaa891dd0944a00432ce3d2cfb


3.Enable cc toolchain resolution for building Bazel

Commit
bazelbuild@5647b26

PiperOrigin-RevId: 551218176
Change-Id: Ia01c3b83b071b50b353f116dbd360bd3fe04f0c3

---------

Co-authored-by: Googler <pcloudy@google.com>
Co-authored-by: Chi Wang <chiwang@google.com>
  • Loading branch information
3 people authored Aug 17, 2023
1 parent e34112f commit 8ac1cc1
Show file tree
Hide file tree
Showing 4 changed files with 18 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 @@ -55,8 +55,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"
6 changes: 6 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@ build:remote --config=ubuntu1804_java11

build:macos --macos_minimum_os=10.11

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

# Enable Bzlmod
build:bzlmod --experimental_enable_bzlmod

# Enable Java 11 language features (https://github.com/bazelbuild/bazel/issues/14592)
build --java_language_version=11
build --tool_java_language_version=11

# Manually enable cc toolchain resolution before it is flipped. https://github.com/bazelbuild/bazel/issues/7260
build --incompatible_enable_cc_toolchain_resolution

# User-specific .bazelrc
try-import %workspace%/user.bazelrc

Expand Down
8 changes: 8 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,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
3 changes: 3 additions & 0 deletions third_party/blake3/blake3.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ cc_library(
"-DBLAKE3_NO_AVX512",
],
"@bazel_tools//src/conditions:windows_x64": [],
"@bazel_tools//src/conditions:windows_arm64": [
"-DBLAKE3_USE_NEON=0",
],
"@bazel_tools//src/conditions:darwin_arm64": [
"-DBLAKE3_USE_NEON=1",
],
Expand Down

0 comments on commit 8ac1cc1

Please sign in to comment.