Cross-compiling for Windows x64 on Windows arm64 possible?

Is it possible to produce binaries for Windows x64 when running Swift on Windows arm64?

Yes, cross-compiling ARM64 to X64 is possible as is the reverse. I suspect that the complexity lies in getting SPM to do the right thing. If you are using CMake, this is pretty straight forward and should be working quite well. At The Browser Company, we are already cross-compiling ARM64 from X64.

The Windows toolchain distribution is designed for cross-compiling and treats compiling where the build and the host are the same as a degenerate case of cross-compiling.

3 Likes