FreeBSD mentioned as supported for Swift 6.2

In the WWDC 2025 video "What's new in Swift" at about 23m00s it is mentioned that FreeBSD 6.2 is a supported platform for Swift (as well was Wasm). I tried to find more information about this as well as builds (forum, google, duckduckgo), but found nothing new. Is there more information about this? I searched the forum, but wasn't able to find recent information. Is there any more information about this?

11 Likes

I have been tracking this page: Swift on FreeBSD · GitHub

5 Likes

I'm reading this as "Apple will dedicate development effort to ensure that Swift builds on FreeBSD and that toolchain packages are available for FreeBSD" but that effort is still in progress.

3 Likes

I just want this now, but also OpenBSD. Fine, I’ll be patient.

2 Likes

Open is getting pretty close. I'll try and get an end-to-end WIP port available within a few weeks, but there are still some subtle bugs to hunt down.

5 Likes

Pretty sure from discussions with Apple people on the swift team, it will be done when 6.2 ships.

3 Likes

Do you have any updates? I am curious to know how OpenBSD's port for Swift is going.

Sorry, I've been super busy.

Here's a status update of where everything is at.

What's left so you can bootstrap at HEAD so you can DIY: Upstreaming Use libpthread primitives for OpenBSD mutexes. by 3405691582 · Pull Request #82392 · swiftlang/swift · GitHub, fixing [bootstrap] SIL verification failure when BRIDGING_MODE=PURE and bootstrapping stage0 -> stage1 · Issue #82607 · swiftlang/swift · GitHub

What's left for building a WIP port for 6.2: Upstreaming [6.2][cherrypick] Backport upstream cherrypicks for OpenBSD from stable. by 3405691582 · Pull Request #10885 · swiftlang/llvm-project · GitHub and
[6.2][cherrypick] Plumb native-clang-tools-path to build support. by 3405691582 · Pull Request #82768 · swiftlang/swift · GitHub . I also need to figure out how to adapt the final bootstrap phase to OpenBSD's "make fake" stage. Once I've done that, I can share a WIP port for the ports system.

I periodically update OpenBSD port tracking · Issue #78437 · swiftlang/swift · GitHub for further tracking and instructions if you want to build it yourself in the interim.

2 Likes

This is excellent. Which processors does your work support for OpenBSD?

amd64 and arm64, but I'm mainly developing on arm64.

Note that BTCFI is not enabled by default on arm64 because of a different bug. I would like to get to the bottom of that at some point before I upstream the port, but amd64 should be relatively uncontroversial.

3 Likes

By the way, Swift 5.10 seems to be now available via ports and pkg.

2 Likes

You can also generate a FreeBSD sdk with swift-sdk-generator for cross-compiling.

3 Likes

Y’all I am so excited. I wish I had more time right now to test things out. @3405691582 mentioned as well to me that OpenBSD is getting so much closer to a release. I gotta take time to set up a build VM and test both of these out. This is such an exciting time for us and *BSD.

2 Likes