Enable native support for Windows on arm64
This PR will enable cross-compilation of Bazel binaries for win/arm64 from win/x64
`bazel build -c opt --cpu=x64_arm64_windows //src:bazel.exe`
Generated bazel executable can be used for native compilation in win/arm64
`bazel.exe build //main:hello-world`
Following changes are included
- Add win/arm64 JDK 17
- Fix AutoCpuConverter.java to identify win/arm64 CPU
- Extend build_bazel_binaries.yml to cross-compile for win/arm64
- Fix msvc toolchain to look for tools in HostX86 directory as well
- add clang-cl support for windows/arm64 host
- Extend host_windows config to handle windows x64 and arm64 hosts.
Closes #14340.
PiperOrigin-RevId: 425919351
diff --git a/.bazelci/build_bazel_binaries.yml b/.bazelci/build_bazel_binaries.yml
index 17d49f04..b42defb 100644
--- a/.bazelci/build_bazel_binaries.yml
+++ b/.bazelci/build_bazel_binaries.yml
@@ -49,3 +49,13 @@
build_targets:
- "//src:bazel.exe"
- "//src:bazel_nojdk.exe"
+ windows_arm64:
+ build_flags:
+ - "--copt=-w"
+ - "--host_copt=-w"
+ - "-c"
+ - "opt"
+ - "--cpu=x64_arm64_windows"
+ build_targets:
+ - "//src:bazel.exe"
+ - "//src:bazel_nojdk.exe"