File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,18 +15,18 @@ if ! which cmake; then
1515fi
1616
1717cd " $WORKING_DIR "
18- if [ ! -d " $WORKING_DIR /swift- llvm" ]; then
19- git clone https://github.com/apple/swift- llvm.git -b " $SWIFT_BRANCH "
18+ if [ ! -d " $WORKING_DIR /llvm-project " ]; then
19+ git clone https://github.com/apple/llvm-project .git
2020fi
21- cd " $WORKING_DIR /swift- llvm"
21+ cd " $WORKING_DIR /llvm-project "
2222git reset --hard
2323git clean -f
24- git checkout " origin/ $SWIFT_BRANCH "
24+ git checkout " $LLVM_BRANCH "
2525cd ..
2626
2727mkdir -p llvm-build
2828cd llvm-build
29- cmake " $WORKING_DIR /swift- llvm" -DCMAKE_INSTALL_PREFIX=" $WORKING_DIR /llvm-root" -DCMAKE_BUILD_TYPE=Release -DLLVM_INSTALL_UTILS=ON -DLLVM_TARGETS_TO_BUILD=' X86;ARM;AArch64' -G Ninja
29+ cmake " $WORKING_DIR /llvm-project/ llvm" -DCMAKE_INSTALL_PREFIX=" $WORKING_DIR /llvm-root" -DCMAKE_BUILD_TYPE=Release -DLLVM_INSTALL_UTILS=ON -DLLVM_TARGETS_TO_BUILD=' X86;ARM;AArch64' -G Ninja
3030ninja
3131ninja install
3232
3737cd rust
3838git reset --hard
3939git clean -f
40- git checkout " $RUST_COMMIT "
40+ git checkout " $RUST_BRANCH "
4141cd ..
4242mkdir -p rust-build
4343cd rust-build
Original file line number Diff line number Diff line change 1- # 1. Select the best branch from https://github.com/apple/swift-llvm
2-
1+ # 1. Select the best branch, tag or commit hash from https://github.com/apple/llvm-project
2+ # The recommended approach is to use the tagged release that matches the Swift version
3+ # returned by the command below (at this time running Xcode Version 11.3.1 (11C504))
34# $ xcrun -sdk iphoneos swiftc --version
4- # Apple Swift version 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)
5- # Target: x86_64-apple-darwin19.0.0
5+ # Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
6+ # Target: x86_64-apple-darwin19.3.0
7+
8+ LLVM_BRANCH=" tags/swift-5.1.3-RELEASE"
9+
10+ # 2. Select the best branch, tag or commit hash from https://github.com/rust-lang/rust
11+ # The stable 1.40.0 version of Rust seems to work
612
7- # There is a branch called "stable" which looks promising
8- # At this time (running Xcode 11.3) it's a couple of months newer than the 5.1 branch
9- SWIFT_BRANCH=" stable"
13+ RUST_BRANCH=" tags/1.40.0"
1014
11- # 2. Pick/install a working Rust nightly (ideally one where RLS and clippy built)
12- # 3. Note its date
13- RUST_NIGHTLY=" 2019-12-16"
15+ # 3. Select a name for the toolchain you want to install as. The toolchain will be installed
16+ # under $HOME/.rust-ios-arm64/toolchain-$RUST_TOOLCHAIN
1417
15- # 4. Get its commit - this is what we will check out to build the iOS version
16- # rustc --version | cut -d '(' -f2 | cut -d ' ' -f1
17- RUST_COMMIT=" a605441e0"
18+ RUST_TOOLCHAIN=" 1.40.0"
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ set -euxo
33source config.sh
44
55WORKING_DIR=" $( pwd) /build"
6- DEST_TOOLCHAIN=" $HOME /.rust-ios-arm64/toolchain-$RUST_NIGHTLY "
6+ DEST_TOOLCHAIN=" $HOME /.rust-ios-arm64/toolchain-$RUST_TOOLCHAIN "
77
88mkdir -p " $DEST_TOOLCHAIN "
99cp -r " $WORKING_DIR /rust-build/build/x86_64-apple-darwin/stage2" /* " $DEST_TOOLCHAIN "
You can’t perform that action at this time.
0 commit comments