[FreeBSD] Adding FreeBSD support#77836
Conversation
|
It's my early Christmas gift. Thanks for working on this. |
unfortunately this PR alone here is not enough. I do have patches to other swift components to get it fully working and going to PR them to coming weeks. But even with those, you'll need to have a functional you also need a patch to the base libc++ to workaround this issue |
|
it's very impressive work especially the bootstrap part! |
|
Nice, there is some work to get Swift 6 bootstrapping again, #77815, that you'll want to follow. Pinging @mhjacobson and @3405691582, who added BSD support before and may be able to help review. |
|
As a heads up, the code uses LLVM target triples and the build system has a few places where it assumes that the platform calls the architecture with the same name as LLVM does. This isn't a problem for FreeBSD on what LLVM calls In the past, I've tried to keep some meaningful separation between platform spelling and LLVM spelling, but I'm reconsidering that in #77879. You probably won't need to do anything right now for this pr if you're just targeting |
Which is not correct for the FreeBSD part. On FreeBSD itself, arm64 is the TARGET, meanwhile aarch64 is the TARGET_ARCH and MACHINE_ARCH. Below is what I got from a build of the FreeBSD tree on my side: For reference how we build the -target tuple in the tree: |
|
@swift-ci please smoke test |
|
@swift-ci please test |
8c4f0d4 to
65db70b
Compare
|
@shahmishal Could you or someone else kick off the CI here so we can get Michael’s work merged? |
|
@swift-ci please test. |
… and trivial copy ctor is yet available even on 14
|
@swift-ci please test |
|
@swift-ci please test |
|
@swift-ci please test windows |
|
macOS test failure is a regression brought in by #82275. |
|
#82329 landed with a fix. |
|
@swift-ci please test macOS |
This commit adds required conditional compilation blocks to enable building and running
on FreeBSD (tested on x86_64 FreeBSD 14.1-RELEASE-p6).
Also implements FreeBSD synchronization shims using
_umtx_op(2)