Skip to content

Commit

Permalink
Move rustup component installation to rust-toolchain
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bjorn3 committed Jan 25, 2022
1 parent cd5d42a commit 6663f4e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cargo.sh
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion 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
4 changes: 3 additions & 1 deletion rust-toolchain
@@ -1 +1,3 @@
nightly-2021-12-30
[toolchain]
channel = "nightly-2021-12-30"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
2 changes: 1 addition & 1 deletion test.sh
Expand Up @@ -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
Expand Down

0 comments on commit 6663f4e

Please sign in to comment.