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

Implement the ARM64 Windows context switch #15155

Conversation

HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Nov 5, 2024

Follow-up to #14911. This is essentially the existing AArch64 context switch, plus the Win32-specific Thread Information Block handling. It makes specs like spec/std/channel_spec.cr pass, and the compiler macro run also depends on it.

@HertzDevil HertzDevil added kind:feature topic:stdlib:concurrency platform:windows Windows support based on the MSVC toolchain / Win32 API platform:aarch64 labels Nov 5, 2024
@ysbaddaden
Copy link
Contributor

ysbaddaden commented Nov 5, 2024

Aside question: is there any reason to keep supporting LLVM 9? Especially for AArch64 where we recommend to use at least LLVM 13?

Edit: even Crystal 1.0 was released with LLVM 10 it seems (at least on Linux).

@HertzDevil
Copy link
Contributor Author

HertzDevil commented Nov 5, 2024

Before we switched to the current AArch64 CI images, the previous ones actually used LLVM 8

@straight-shoota straight-shoota added this to the 1.15.0 milestone Nov 5, 2024
@straight-shoota straight-shoota merged commit c322370 into crystal-lang:master Nov 6, 2024
69 checks passed
@HertzDevil HertzDevil deleted the feature/windows-arm64-context-switch branch November 6, 2024 09:39
straight-shoota pushed a commit that referenced this pull request Nov 7, 2024
Tested using a Windows VM on an Apple M2 host.

The instructions we use in our MinGW-w64 CI workflow will just work by simply replacing `-ucrt-` in the MSYS2 package names with `-clang-aarch64-`. Requires #15155 on both the cross-compilation host and the target.
CTC97 pushed a commit to CTC97/crystal that referenced this pull request Nov 9, 2024
This is essentially the existing AArch64 context switch, plus the Win32-specific Thread Information Block handling. It makes specs like `spec/std/channel_spec.cr` pass, and the compiler macro run also depends on it.
CTC97 pushed a commit to CTC97/crystal that referenced this pull request Nov 9, 2024
…#15159)

Tested using a Windows VM on an Apple M2 host.

The instructions we use in our MinGW-w64 CI workflow will just work by simply replacing `-ucrt-` in the MSYS2 package names with `-clang-aarch64-`. Requires crystal-lang#15155 on both the cross-compilation host and the target.
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:stdlib:concurrency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants