-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FreeBSD support ### Checklist - [x] I've run tests to see all new and existing tests pass - [x] I've followed the code style of the rest of the project - [x] I've read the [Contribution Guidelines](CONTRIBUTING.md) - [x] I've updated the documentation if necessary ### Motivation: To add FreeBSD support to Swift, we must ensure that swift crypto builds on FreeBSD since it's a dependency of swiftpm and several essential packages. ### Modifications: - `Package.swift` - Ideally FreeBSD should use `.when(platforms:)` to set the corresponding swift settings and dependencies. However, `Platform.freebsd` is not yet available on swiftpm and therefore use guard the settings behind a `isFreeBSD` boolean flag. This is chosen because it minimize the diff and maintains the maximum readability. - `cmake/modules/SwiftSupport.cmake` - add `amd64` arch support, maps to `x86_64`. - `**/CMakeLists.txt` - Use the Linux assembly files for FreeBSD. Both Linux and FreeBSD uses SysV ABI, and there're no syscalls involved (after all, they're supposed to be "pure") so there are no ABI compatibility problem. After all, all the tests are passing on FreeBSD with this PR. ### Result: All the tests (via `swift test`) passed on x86_64 FreeBSD 14.1-p6, and passed on aarch64 macOS. Test log available here: [swift-test-result.txt](https://github.com/user-attachments/files/18147920/swift-test-result.txt)
- Loading branch information
1 parent
555b9f1
commit bce1725
Showing
6 changed files
with
18 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters