Skip to content

Instantly share code, notes, and snippets.

@Kyle-Ye
Last active October 21, 2024 08:58
Show Gist options
  • Save Kyle-Ye/6628794c91803442b92c2296512fcb6e to your computer and use it in GitHub Desktop.
Save Kyle-Ye/6628794c91803442b92c2296512fcb6e to your computer and use it in GitHub Desktop.
Swift 5.10 Build script
// Set up swift repo
mkdir -p ~/tmp/build/swift-project
cd ~/tmp/build/swift-project
git clone [email protected]:swiftlang/swift.git
// Update the swift-project
cd swift
utils/update-checkout --clone-with-ssh
// Check out to the 5.10 release
utils/update-checkout --scheme release/5.10
// Install cmake, python3 and ninja
// cmkae >= 3.19.6
// python3 >= 3.6
brew install cmake python3 ninja sccache
// Build the toolchain with Xcode 15.3
utils/build-script --skip-build-benchmarks \
--swift-darwin-supported-archs "$(uname -m)" \
--release-debuginfo --swift-disable-dead-stripping \
--bootstrapping=hosttools
@Kyle-Ye
Copy link
Author

Kyle-Ye commented Oct 16, 2024

For Swift 6.0, please use the latest release/6.0.2 branch.

// Xcode 16.0 Toolchain
utils/update-checkout --scheme release/6.0.2
utils/build-script --skip-build-benchmarks \
  --swift-darwin-supported-archs "$(uname -m)" \
  --release-debuginfo --swift-disable-dead-stripping \
  --bootstrapping=hosttools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment