Swift is officially supported on Darwin, Linux, and Windows. Some people have put in work to get it running on FreeBSD and OpenBSD, but lately the FreeBSD port has succumbed to bit rot.
A few weeks ago, I started working on getting the FreeBSD port working again. I'm going to try something new where I attempt to use a blog entry for my project notes, with the hopes that it'll force me to organize them better.
This document is likely incomplete and incorrect.
Changes required for Swift 5.7
- Build system fix in
configure_unix_sdk; PR merged
- Build fix in
swift-dependency-tool; PR merged
CLongDouble; PR merged
RTLD_DEFAULT; PR merged
- Another build system fix in
gold; PR merged, PR merged
- Fix bootstrapped build; PR merged
- Don't pass
-nostdsystemincin ClangImporter; PR
- Fix build of
These are fixes for bugs introduced after 5.7.
- Fix FreeBSD build in
lib/Threading; PR merged
- Move clang include path management from frontend to driver; patch accepted
Work in progress
- Problem finding SwiftGlibc due to ClangImporter's looking at driver arguments—need to backport clang change
- stdlib dylibs are not being given an RPATH, which prevents them from being linked; patch prepared
Floatmethods use LLVM intrinsics like
@llvm.round, which require libm, which is not linked; patch prepared
This stuff will be updated on an ongoing basis:
- Get dispatch up and running
- Add swift-driver to build