about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2022-01-24 19:45:38 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2022-01-25 13:28:42 +0100
commit6663f4e78e001fe711011ea9df7a0692a73a7695 (patch)
tree1d957d7c2933e2c486d9b62bb98d37b5990d2b50
parentcd5d42aad743d49a368d9e65d678be72387808c7 (diff)
downloadrust-6663f4e78e001fe711011ea9df7a0692a73a7695.tar.gz
rust-6663f4e78e001fe711011ea9df7a0692a73a7695.zip
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.
-rwxr-xr-xcargo.sh2
-rwxr-xr-xprepare_build.sh1
-rw-r--r--rust-toolchain4
-rwxr-xr-xtest.sh2
4 files changed, 5 insertions, 4 deletions
diff --git a/cargo.sh b/cargo.sh
index 1001c522052..332f365ce0c 100755
--- a/cargo.sh
+++ b/cargo.sh
@@ -8,7 +8,7 @@ pushd $(dirname "$0") >/dev/null
 source config.sh
 
 # read nightly compiler from rust-toolchain file
-TOOLCHAIN=$(cat rust-toolchain)
+TOOLCHAIN=$(cat rust-toolchain | grep channel | sed 's/channel = "\(.*\)"/\1/')
 
 popd >/dev/null
 
diff --git a/prepare_build.sh b/prepare_build.sh
index ccf53509830..3896775a0b9 100755
--- a/prepare_build.sh
+++ b/prepare_build.sh
@@ -1,5 +1,4 @@
 #!/bin/bash --verbose
 set -e
 
-rustup component add rust-src rustc-dev llvm-tools-preview
 ./build_sysroot/prepare_sysroot_src.sh
diff --git a/rust-toolchain b/rust-toolchain
index ee0822f6c31..cab94c0b8cf 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1 +1,3 @@
-nightly-2021-12-30
+[toolchain]
+channel = "nightly-2021-12-30"
+components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
diff --git a/test.sh b/test.sh
index 944d0ce516e..70bd86edcbe 100755
--- a/test.sh
+++ b/test.sh
@@ -145,7 +145,7 @@ function test_rustc() {
     echo
     echo "[TEST] rust-lang/rust"
 
-    rust_toolchain=$(cat rust-toolchain)
+    rust_toolchain=$(cat rust-toolchain | grep channel | sed 's/channel = "\(.*\)"/\1/')
 
     git clone https://github.com/rust-lang/rust.git || true
     cd rust