-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support building C++ binaries for ARM and ARM64 architectures on Windows with MSVC toolchain #11973
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_windows
andcc-compiler-x64_arm64_windows
for 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