From 6663f4e78e001fe711011ea9df7a0692a73a7695 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Mon, 24 Jan 2022 19:45:38 +0100 Subject: [PATCH] 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. --- cargo.sh | 2 +- prepare_build.sh | 1 - rust-toolchain | 4 +++- test.sh | 2 +- 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