-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Swift on OpenBSD supports arm64. #77879
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
Conversation
finagolfin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, further OpenBSD AArch64 patches incoming?
This contains just the key changes to get it building (especially with #77815). If I get around to addressing test failures and similar, then there may be more. |
b58f900 to
f3b8f4a
Compare
However, to do this, we end up changing how amd64 is supported too. Previously, I had tried to keep some meaningful separation between platform spelling and LLVM spelling, but this is becoming more difficult to meaningfully maintain. Target specifications are trivially converted LLVM triples, and the module files are looked up by LLVM triples. We can make sure that the targets align, but then the Glibc to SwiftGlibc import breaks. That could also be addressed, but then we get to a point where the targets set up by build-script and referenced by cmake begin to misalign. There are references in build-script-impl for a potential renaming site, but it's not quite enough. It's far simpler to give up and rename to LLVM spellings right at the beginning. This does mean that this commit is less constrained to just adding the necessary parts to enable arm64, but it should mean less headaches overall from differing architecture spellings.
|
PTAL, if you feel so inclined, since I have had to change the scope and implementation here. |
DougGregor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, thank you!
|
@swift-ci please test |
However, to do this, we end up changing how amd64 is supported too. Previously, I had tried to keep some meaningful separation between platform spelling and LLVM spelling, but this is becoming more difficult
to meaningfully maintain.
See the commit comment for more specifics, but it suffices to say that it's far simpler to give up and rename to LLVM spellings right at the beginning. This does mean that this commit is less constrained to just adding the necessary parts to enable arm64, but it should mean less headaches overall from differing architecture spellings.
Other than that, the only real change of note is that
-Wl,-Bsymbolicseems necessary to squash some relocation errors; I have not verified whether this is only necessary on arm64.