-
Notifications
You must be signed in to change notification settings - Fork 282
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
Add arm64 support to CMake build #64
Conversation
Testing this out first via cross-repo testing on a Swift PR. |
cc @lorentey @compnerd @shahmishal if this works I think we would also need a new tag and update swift build script to pull it |
@neonichu @lorentey @compnerd we need this (+ new tag) to unblock swiftlang/swift-package-manager#3632. do you think this is ready? |
I'm ready to hit the merge button & tag a release if y'all say it works as expected. @swift-ci test |
I think that this is slightly regressing the behavior. I think that there are now out of sync (foundation, dispatch, etc have a copy as well). The install layout has evolved a bit from the 5.1/5.2 days. All the platforms now support the directory layout as well. Windows prefers that layout with the module being triple named rather than just arch I believe. |
@compnerd Do you have a suggestion on which version of this file we should standardize? Is Foundation the canonical one? |
The changes that I believe haven't been synced are the ones to The changes that you have to the elseif ("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "AArch64|ARM64")
if(CMAKE_SYSTEM_NAME MATCHES Darwin)
set("${result_var_name}" "arm64" PARENT_SCOPE)
else()
set("${result_var_name}" "aarch64" PARENT_SCOPE)
endif() |
c58270c
to
5881b4b
Compare
OK, thanks. I updated it, but it seems like we do need the lowercase "arm64" in the check of |
Hmm, I wonder if we should do |
I think that you missed the update for the second half of the change (the install location). |
@swift-ci please test |
OK, I removed the unnecessary changes and tested this locally, seems to work fine. |
LGTM; we should verify that the Linux ARM64 builds are unimpacted, but otherwise, LGTM |
Actually, I think I flipped it with my last edits, it'll now use "aarch64" on Darwin. |
This is pretty speculative, I just copied the `SwiftSupport.cmake` from swift-argument-parser which seems to have support for arm64.
I'm happy to merge & tag as soon as someone confirms this is what we want. 😉 @neonichu, did you mean to swap the spellings? IIUC Swift Argument Parser uses |
@swift-ci please test |
@lorentey Yes, absolutely. I failed to push my latest changes. Interestingly, it seemed to have no impact on being able to build, either version worked. |
@lorentey I guess we need a new tag, so we can pull this into toolchain + SwiftPM. Do you have any other pending changes? |
This is pretty speculative, I just copied the
SwiftSupport.cmake
from swift-argument-parser which seems to have support for arm64.