Skip to content

Commit 1b73054

Browse files
committed
Problem: cargo was not available as part of the toolchain.
Solution: Ensure that cargo is built as part of the toolchain by enabling the build to be extended (`--enable-extended`) and specifying cargo in the set of tools to be built (`--tools=cargo`), both in build.sh. Add a line in install.sh to copy the built cargo binary to the toolchain's installation directory.
1 parent d2e6dcd commit 1b73054

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ git checkout "$RUST_COMMIT"
4141
cd ..
4242
mkdir -p rust-build
4343
cd rust-build
44-
../rust/configure --llvm-config="$WORKING_DIR/llvm-root/bin/llvm-config" --target=aarch64-apple-ios
44+
../rust/configure --llvm-config="$WORKING_DIR/llvm-root/bin/llvm-config" --target=aarch64-apple-ios --enable-extended --tools=cargo
4545
export RUSTFLAGS_NOT_BOOTSTRAP=-Zembed-bitcode
4646
export CFLAGS_aarch64_apple_ios=-fembed-bitcode
4747
python "$WORKING_DIR/rust/x.py" build

install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ DEST_TOOLCHAIN="$HOME/.rust-ios-arm64/toolchain-$RUST_NIGHTLY"
77

88
mkdir -p "$DEST_TOOLCHAIN"
99
cp -r "$WORKING_DIR/rust-build/build/x86_64-apple-darwin/stage2"/* "$DEST_TOOLCHAIN"
10+
cp -r "$WORKING_DIR/rust-build/build/x86_64-apple-darwin/stage2-tools/x86_64-apple-darwin/release/cargo" "$DEST_TOOLCHAIN/bin"
1011

1112
rustup toolchain link ios-arm64 "$DEST_TOOLCHAIN"

0 commit comments

Comments
 (0)