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

Hi all, any news on FreeBSD and OpenBSD as version 6.2 has been released for Linux, Windows and the Apple platforms? :nerd_face:

1 Like

OpenBSD’s port is still in progress and not upstreamed yet, but if you’d like to experiment with building the port from source from the OpenBSD ports system, I can share a diff with you.

1 Like

I still haven't been successful at compiling. If you didn't mind posting instructions so I can figure out where I am going wrong, I do not mind trying again. I forgot to log my last output to send.

Please try again and give me some indication of what went wrong last time, so I can tell you how best to resolve the issue or work on fixing it.

1 Like

Curious if there is any official news about when official FreeBSD support will ship.

Nothing official, but I asked the people working on it a couple weeks ago and was told it's been delayed because of some issues that came up. It is easy to see that work is ongoing on github, with a pull just merged yesterday, so I'm sure they'd love nothing more than to get it out there :grinning_face:, once it's ready.

Heard anything more recent? Two months past the promised release, and waiting to be able to deploy some projects. :-)

1 Like