@@ -213,6 +213,13 @@ function setup_rustc() {
213
213
214
214
rm config.toml || true
215
215
216
+ # TODO: copy in build_sysroot/build_sysroot.sh instead to avoid having to rebuild stage0 libraries everytime?
217
+ my_toolchain_dir=$HOME /.rustup/toolchains/my_toolchain
218
+ rm -rf $my_toolchain_dir
219
+ cp -r $HOME /.rustup/toolchains/$rust_toolchain -$TARGET_TRIPLE $my_toolchain_dir
220
+ rm -rf $my_toolchain_dir /lib/rustlib/x86_64-unknown-linux-gnu/
221
+ cp -r ../build_sysroot/sysroot/* $my_toolchain_dir
222
+
216
223
cat > config.toml << EOF
217
224
changelog-seen = 2
218
225
@@ -221,9 +228,11 @@ codegen-backends = []
221
228
deny-warnings = false
222
229
223
230
[build]
224
- cargo = "$( rustup which cargo) "
231
+ cargo = "$my_toolchain_dir /bin/cargo"
232
+ #cargo = "$( rustup which cargo) "
225
233
local-rebuild = true
226
- rustc = "$HOME /.rustup/toolchains/$rust_toolchain -$TARGET_TRIPLE /bin/rustc"
234
+ rustc = "$my_toolchain_dir /bin/rustc"
235
+ #rustc = "$HOME /.rustup/toolchains/$rust_toolchain -$TARGET_TRIPLE /bin/rustc"
227
236
228
237
[target.x86_64-unknown-linux-gnu]
229
238
llvm-filecheck = "` which FileCheck-10 || which FileCheck-11 || which FileCheck-12 || which FileCheck-13 || which FileCheck-14` "
@@ -361,7 +370,9 @@ function test_rustc() {
361
370
# done
362
371
363
372
# TODO: copy the sysroot at the correct location to not have to use the --sysroot flag.
364
- RUSTC_ARGS=" $TEST_FLAGS -Csymbol-mangling-version=v0 -Zcodegen-backend=" $( pwd) " /../target/" $CHANNEL " /librustc_codegen_gcc." $dylib_ext " --sysroot " $( pwd) " /../build_sysroot/sysroot"
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"
375
+
365
376
366
377
if [ $# -eq 0 ]; then
367
378
# No argument supplied to the function. Doing nothing.
@@ -393,7 +404,8 @@ function test_rustc() {
393
404
fi
394
405
395
406
echo " [TEST] rustc test suite"
396
- COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 tests/ui/ --rustc-args " $RUSTC_ARGS "
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 "
397
409
}
398
410
399
411
function test_failing_rustc() {
0 commit comments