Skip to content

🍒6.2: Grabbing missing changes on main for FreeBSD support #83500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 13 commits into
base: release/6.2
Choose a base branch
from

Conversation

etcwilde and others added 12 commits August 1, 2025 17:00
Adding a preset for building the FreeBSD toolchain and runtime package.
This is very similar to the Linux package build, but the main difference
is the lack of WASM build. The WASM runtime build system uses GNU
extensions in its makefiles that are not compatible with the make or
gmake on FreeBSD and therefore cannot be built there.

(cherry picked from commit dbb3498)
The SIMD module is not available on FreeBSD, disabling it.

(cherry picked from commit 3316e82)
Fixing pthread usage in tsan and tsan-inout tests. pthreads are imported
as opaque pointers on FreeBDS, and thus need to be kept in an optional
pthread_t, like on Apple platforms.

Unlike on macOS, pthread_join is not annotated with nullability
annotations and thus takes an optional opaque pointer, so we don't need
to unwrap it.

(cherry picked from commit 79f7b63)
Newer versions of lld are keeping the unused function section for func2,
causing this test to fail.

(cherry picked from commit 6b0f814)
The CCryptoBoringSSL library changed from C to C++, which means that the
static archive on Windows changed names, from `CCryptoBoringSSL.lib` to
`libCCryptoBoringSSL.lib`. The SourceKit-LSP SwiftPM test invocation
explicitly passed `CCryptoBoringSSL.lib` to the SwiftPM invocation,
resulting in the wrong search path. Pointing it at the correct location
now.

(cherry picked from commit 2ff24aa)
Updating the tags for Swift-Collections, Swift-Crypto,
Swift-Certificates, and Swift-ASN1 to pick up changes needed for
FreeBSD.

e9d42a4
The clang resource directory generally does not use a versioned form of
the platform name. This aligns the old driver behavior with the new
driver for FreeBSD support.

https://github.com/swiftlang/swift-driver/blob/a7f32bd005de1b998495ddc052bf78fc3cebdaa5/Sources/SwiftDriver/Jobs/GenericUnixToolchain%2BLinkerSupport.swift#L309
(cherry picked from commit dbe7c13)
The sourcekit in proc dynamic library looks up runtimes in a spot
relative to the Swift compiler. Set this location on freebsd, fixing the
sourcekit tests.

(cherry picked from commit 90eed66)
Some of these tests were marked as unsupported since they were only
checking for macOS and Linux. They seem to be passing on FreeBSD as
well, so enabling them here.

(cherry picked from commit 3a48d6e)
This hooks up the autolink mechanism to link the C++ runtime when C++
interop is enabled on FreeBSD.

(cherry picked from commit 91aa7b8)
This aligns the old driver with the behavior of the new driver.
When building with C++ interop enabled, it's important that we link a
C++ runtime, which is handled by the clang++ driver.
The new driver uses clang++ when linking with C++ enabled, either
through the c++ interoperability mode flag or the experimental C++
interop flag. The old driver only enabled it with the experimental C++
interop flag. This results in the C++ interop tests failing on FreeBSD
and a behavioral difference between what we are testing and what we are
shipping.

(cherry picked from commit 3376785)
@etcwilde
Copy link
Member Author

etcwilde commented Aug 2, 2025

@swift-ci please test

Cherry-picking commits in cf2f715
@etcwilde etcwilde force-pushed the ewilde/mega-freebsd-cherry-pick branch from 56222e4 to 284c5a8 Compare August 4, 2025 21:18
@etcwilde
Copy link
Member Author

etcwilde commented Aug 4, 2025

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FreeBSD Platform: FreeBSD
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants