Swift on OpenBSD supports arm64.

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.
This commit is contained in:
3405691582
2024-11-29 22:36:54 -05:00
parent c690fefef7
commit 301a0c49fc
5 changed files with 11 additions and 5 deletions

View File

@@ -529,6 +529,7 @@ function(_add_target_variant_link_flags)
list(APPEND link_libraries "pthread")
elseif("${LFLAGS_SDK}" STREQUAL "OPENBSD")
list(APPEND link_libraries "pthread")
list(APPEND result "-Wl,-Bsymbolic")
elseif("${LFLAGS_SDK}" STREQUAL "CYGWIN")
# No extra libraries required.
elseif("${LFLAGS_SDK}" STREQUAL "WINDOWS")