diff --git a/build_sysroot/build_sysroot.sh b/build_sysroot/build_sysroot.sh index 063219aabd2..6aea9b94b48 100755 --- a/build_sysroot/build_sysroot.sh +++ b/build_sysroot/build_sysroot.sh @@ -30,9 +30,9 @@ mkdir -p sysroot/lib/rustlib/$TARGET_TRIPLE/lib/ cp -r target/$TARGET_TRIPLE/$sysroot_channel/deps/* sysroot/lib/rustlib/$TARGET_TRIPLE/lib/ # Since we can't override the sysroot for the UI tests anymore, we create a new toolchain and manually overwrite the sysroot directory. -my_toolchain_dir=$HOME/.rustup/toolchains/codegen_gcc_ui_tests -rm -rf $my_toolchain_dir rust_toolchain=$(cat ../rust-toolchain | grep channel | sed 's/channel = "\(.*\)"/\1/') +my_toolchain_dir=$HOME/.rustup/toolchains/codegen_gcc_ui_tests-$rust_toolchain-$TARGET_TRIPLE +rm -rf $my_toolchain_dir cp -r $HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE $my_toolchain_dir rm -rf $my_toolchain_dir/lib/rustlib/$TARGET_TRIPLE/ cp -r ../build_sysroot/sysroot/* $my_toolchain_dir diff --git a/test.sh b/test.sh index 6213ed49183..2e485b92739 100755 --- a/test.sh +++ b/test.sh @@ -209,11 +209,12 @@ function setup_rustc() { cd rust git fetch git checkout $(rustc -V | cut -d' ' -f3 | tr -d '(') + git am ../0001-Allow-overwriting-the-sysroot-compile-flag-via-rustc.patch export RUSTFLAGS= rm config.toml || true - my_toolchain_dir=$HOME/.rustup/toolchains/codegen_gcc_ui_tests + my_toolchain_dir=$HOME/.rustup/toolchains/codegen_gcc_ui_tests-$rust_toolchain-$TARGET_TRIPLE cat > config.toml <