@@ -213,7 +213,8 @@ function setup_rustc() {
213213
214214 rm config.toml || true
215215
216- # TODO: copy in build_sysroot/build_sysroot.sh instead to avoid having to rebuild stage0 libraries everytime?
216+ # TODO: move these lines to build_sysroot/build_sysroot.sh instead to avoid having to rebuild stage0 libraries everytime?
217+ # Since we can't override the sysroot anymore, we create a new toolchain and manually overwrite the sysroot directory.
217218 my_toolchain_dir=$HOME /.rustup/toolchains/my_toolchain
218219 rm -rf $my_toolchain_dir
219220 cp -r $HOME /.rustup/toolchains/$rust_toolchain -$TARGET_TRIPLE $my_toolchain_dir
@@ -362,16 +363,7 @@ function test_rustc() {
362363 git checkout tests/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs
363364 git checkout tests/ui/macros/rfc-2011-nicer-assert-messages/auxiliary/common.rs
364365
365- # We need to overwrite the sysroot in the tests, now.
366- # TODO(antoyo): find a faster way to do this.
367- # FIXME: this makes the stderr different since it changes the line numbers.
368- # for file in $(find tests/ui -type f -name '*.rs'); do
369- # sed -ie "1i // compile-flags: --sysroot "$(pwd)"/../build_sysroot/sysroot\n" $file
370- # done
371-
372- # TODO: copy the sysroot at the correct location to not have to use the --sysroot flag.
373- # RUSTC_ARGS="$TEST_FLAGS -Csymbol-mangling-version=v0 -Zcodegen-backend="$(pwd)"/../target/"$CHANNEL"/librustc_codegen_gcc."$dylib_ext""
374- RUSTC_ARGS=" $TEST_FLAGS -Csymbol-mangling-version=v0 -Zcodegen-backend=" $( pwd) " /../target/" $CHANNEL " /librustc_codegen_gcc." $dylib_ext " --sysroot $HOME /.rustup/toolchains/$rust_toolchain -$TARGET_TRIPLE /bin/rustc"
366+ RUSTC_ARGS=" $TEST_FLAGS -Csymbol-mangling-version=v0 -Zcodegen-backend=" $( pwd) " /../target/" $CHANNEL " /librustc_codegen_gcc." $dylib_ext " "
375367
376368
377369 if [ $# -eq 0 ]; then
@@ -404,8 +396,7 @@ function test_rustc() {
404396 fi
405397
406398 echo " [TEST] rustc test suite"
407- # COMPILETEST_FORCE_STAGE0=1 strace -f ./x.py test --run always --stage 0 tests/ui/ --rustc-args "$RUSTC_ARGS" &> ../trace
408- COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 tests/ui/zero-sized/zero-sized-linkedlist-push.rs --rustc-args " $RUSTC_ARGS "
399+ COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 tests/ui --rustc-args " $RUSTC_ARGS "
409400}
410401
411402function test_failing_rustc() {
0 commit comments