@@ -209,11 +209,12 @@ function setup_rustc() {
209
209
cd rust
210
210
git fetch
211
211
git checkout $( rustc -V | cut -d' ' -f3 | tr -d ' (' )
212
+ git am ../0001-Allow-overwriting-the-sysroot-compile-flag-via-rustc.patch
212
213
export RUSTFLAGS=
213
214
214
215
rm config.toml || true
215
216
216
- my_toolchain_dir=$HOME /.rustup/toolchains/codegen_gcc_ui_tests
217
+ my_toolchain_dir=$HOME /.rustup/toolchains/codegen_gcc_ui_tests- $rust_toolchain - $TARGET_TRIPLE
217
218
218
219
cat > config.toml << EOF
219
220
changelog-seen = 2
@@ -222,12 +223,13 @@ changelog-seen = 2
222
223
codegen-backends = []
223
224
deny-warnings = false
224
225
226
+ # FIXME: it works with the original rustc and cargo.
225
227
[build]
226
- cargo = "$my_toolchain_dir /bin/cargo"
227
- # cargo = "$( rustup which cargo) "
228
+ # cargo = "$my_toolchain_dir /bin/cargo"
229
+ cargo = "$( rustup which cargo) "
228
230
local-rebuild = true
229
- rustc = "$my_toolchain_dir /bin/rustc"
230
- # rustc = "$HOME /.rustup/toolchains/$rust_toolchain -$TARGET_TRIPLE /bin/rustc"
231
+ # rustc = "$my_toolchain_dir /bin/rustc"
232
+ rustc = "$HOME /.rustup/toolchains/$rust_toolchain -$TARGET_TRIPLE /bin/rustc"
231
233
232
234
[target.x86_64-unknown-linux-gnu]
233
235
llvm-filecheck = "` which FileCheck-10 || which FileCheck-11 || which FileCheck-12 || which FileCheck-13 || which FileCheck-14` "
@@ -359,7 +361,7 @@ function test_rustc() {
359
361
git checkout tests/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs
360
362
git checkout tests/ui/macros/rfc-2011-nicer-assert-messages/auxiliary/common.rs
361
363
362
- RUSTC_ARGS=" $TEST_FLAGS -Csymbol-mangling-version=v0 -Zcodegen-backend=" $( pwd) " /../target/" $CHANNEL " /librustc_codegen_gcc." $dylib_ext " "
364
+ RUSTC_ARGS=" $TEST_FLAGS -Csymbol-mangling-version=v0 -Zcodegen-backend=" $( pwd) " /../target/" $CHANNEL " /librustc_codegen_gcc." $dylib_ext " --sysroot " $( pwd ) " /../build_sysroot/sysroot "
363
365
364
366
365
367
if [ $# -eq 0 ]; then
@@ -392,6 +394,7 @@ function test_rustc() {
392
394
fi
393
395
394
396
echo " [TEST] rustc test suite"
397
+ # FIXME: the problem seems like an ABI incompatibility between cg_gcc sysroot and cg_llvm.
395
398
COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 tests/ui --rustc-args " $RUSTC_ARGS "
396
399
}
397
400
0 commit comments