Add support for Windows on aarch64#14911
Merged
straight-shoota merged 3 commits intocrystal-lang:masterfrom Aug 18, 2024
Merged
Add support for Windows on aarch64#14911straight-shoota merged 3 commits intocrystal-lang:masterfrom
straight-shoota merged 3 commits intocrystal-lang:masterfrom
Conversation
straight-shoota
approved these changes
Aug 15, 2024
| end | ||
|
|
||
| IMAGE_FILE_MACHINE_AMD64 = DWORD.new!(0x8664) | ||
| IMAGE_FILE_MACHINE_ARM64 = DWORD.new!(0xAA64) |
Member
There was a problem hiding this comment.
note: This const value is a neat gimmick. 😆
This was referenced Aug 15, 2024
This reverts commit 3f3cdf4.
ysbaddaden
approved these changes
Aug 16, 2024
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds ARM64-specific stack unwinding so that the prelude now compiles for Windows on ARM64.
This is tested in a UTM virtual machine only. To set up:
CRYSTAL_LIBRARY_PATHenvironment variable so that it points at thelibsdirectory created from the previous step;bin\crystal build --target=aarch64-pc-windows-msvc --target -Dwithout_iconvto build something; (we don't need to supply--cross-compileor build a local compiler here)dllsdirectory created above to the current directory manually, since the ones placed by the compiler are the x86-64 ones;For convenience, the x86-64 and ARM64 Windows bindings share the same directory using a symbolic link.
The context switch reuses the existing one for AArch64 Linux, since it seems the ABIs are identical; most
Fiberandselectspecs work, except ones that deal with closedChannels for some reason.