Swift on OpenBSD supports arm64.#77879
Merged
Merged
Conversation
finagolfin
approved these changes
Nov 30, 2024
finagolfin
left a comment
Member
There was a problem hiding this comment.
LGTM, further OpenBSD AArch64 patches incoming?
Member
Author
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. |
This was referenced Nov 30, 2024
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.
Member
Author
|
PTAL, if you feel so inclined, since I have had to change the scope and implementation here. |
Member
|
@swift-ci please test |
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.
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.