Support building C++ binaries for ARM and ARM64 architectures on Windows with MSVC toolchain#11973
Support building C++ binaries for ARM and ARM64 architectures on Windows with MSVC toolchain#11973mai12 wants to merge 1 commit into
Conversation
|
@mai12 Hi Mai. The arm and arm64 toolchains should be available on CI now. I took a look at the test failures, I think even we don't have the toolchains available, it shouldn't be so many broken tests. Can you take a closer look at what's going on? |
|
This is great! One point I think we can improve is when user try to build with --cpu=x64_arm_windows or --cpu=x64_arm64_windows without the arm toolchains installed. It will fail with the following error: It will be a little confusing for users already have x64 toolchain installed, can we mention the exact toolchain we need in the error message? Also, we probably want to document those new toolchains at https://docs.bazel.build/versions/master/windows.html#using |
|
yes, I was actually thinking about changing this error message too. Do you think this will be better? |
|
Yes, that sounds good! |
|
Nice, can you rebase the PR? |
…s using MSVC compilers
This PR will allow Bazel to compile arm and arm64 c++ build targets on windows. New cc toolchains are added to support compiling these binaries using MSVC compiler. These toolchains are
cc-compiler-x64_arm_windowsandcc-compiler-x64_arm64_windowsfor building arm and arm64 c++ targets respectively.To use these toolchains, the --cpu option in the build command needs to be set to their corresponding CPU value.
@meteorcloudy