SDKs for cross-compiling Darwin code on Linux.
Prerequisites:
- macOS or Linux
- jq (
brew install jq
orapt install jq
)
Steps:
- Download Xcode 15.0 or higher.
- If you're on Linux, you can unpack Xcode.xip using unxip.
- Run
./build.sh <linux host> [developer dir]
.- linux host: You can pass any Linux host for which a darwin-tools-linux release exists. e.g.
ubuntu22.04-aarch64
. - developer dir: this should be the path to
Xcode.app/Contents/Developer
. On macOS, you can omit this argument to let the script infer it.
- linux host: You can pass any Linux host for which a darwin-tools-linux release exists. e.g.
Find the output at output/*.artifactbundle
.
Prerequisites:
- Linux
- Swift 5.9 toolchain (https://swift.org/download)
Steps:
- Build a toolchain as described above.
- Run
output/*.artifactbundle/install.sh
on your Linux machine.
swift build --experimental-swift-sdk ios16.0
- Make it easy to use CI (nb: we avoid distributing pre-packaged toolchains for legal reasons)
- Remove installation script once SwiftPM bugs are fixed