Skip to content

Commit 6663f4e

Browse files
committed
Move rustup component installation to rust-toolchain
This allows cargo check to function correctly without having to first run prepare_build.sh. cg_clif has been using rust-toolchain too for a while now.
1 parent cd5d42a commit 6663f4e

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

cargo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pushd $(dirname "$0") >/dev/null
88
source config.sh
99

1010
# read nightly compiler from rust-toolchain file
11-
TOOLCHAIN=$(cat rust-toolchain)
11+
TOOLCHAIN=$(cat rust-toolchain | grep channel | sed 's/channel = "\(.*\)"/\1/')
1212

1313
popd >/dev/null
1414

prepare_build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash --verbose
22
set -e
33

4-
rustup component add rust-src rustc-dev llvm-tools-preview
54
./build_sysroot/prepare_sysroot_src.sh

rust-toolchain

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
nightly-2021-12-30
1+
[toolchain]
2+
channel = "nightly-2021-12-30"
3+
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]

test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ function test_rustc() {
145145
echo
146146
echo "[TEST] rust-lang/rust"
147147

148-
rust_toolchain=$(cat rust-toolchain)
148+
rust_toolchain=$(cat rust-toolchain | grep channel | sed 's/channel = "\(.*\)"/\1/')
149149

150150
git clone https://github.com/rust-lang/rust.git || true
151151
cd rust

0 commit comments

Comments
 (0)