Skip to content
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

Handle ARM64 MSVC paths when cross-compiling on Windows #13073

Merged

Conversation

HertzDevil
Copy link
Contributor

Uses the proper directories for both ARM64 Windows hosts and targets, and also builds our custom LLVM with ARM64 support. These small changes allow an x86-64 Windows Crystal emulated on an ARM64 Windows machine to cross-compile to the aarch64-windows-msvc target, using the correct cl.exe and library directories in the emitted linker command. (This kind of cross-compilation is already doable on any host machine where LLVM was built with AArch64 support, except that the linker command won't include any full paths on non-Windows hosts.)

There is no src/lib_c/aarch64-windows-msvc in this PR, because there are definitely architecture-specific components such as stack unwinding that aren't as simple as this PR.

Those paths are verified on an ARM64 Windows 11 development virtual machine running on UTM under an Apple M2.

@HertzDevil HertzDevil added kind:feature topic:compiler platform:windows Windows support based on the MSVC toolchain / Win32 API platform:aarch64 labels Feb 14, 2023
@straight-shoota straight-shoota added this to the 1.8.0 milestone Feb 14, 2023
@straight-shoota straight-shoota merged commit f731a6b into crystal-lang:master Feb 15, 2023
@HertzDevil HertzDevil deleted the feature/windows-arm64 branch February 15, 2023 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:feature platform:aarch64 platform:windows Windows support based on the MSVC toolchain / Win32 API topic:compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants