mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
Working, but requires a patched rustc
This commit is contained in:
parent
9483008d71
commit
218575a8ae
@ -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
|
||||
|
15
test.sh
15
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 <<EOF
|
||||
changelog-seen = 2
|
||||
@ -222,12 +223,13 @@ changelog-seen = 2
|
||||
codegen-backends = []
|
||||
deny-warnings = false
|
||||
|
||||
# FIXME: it works with the original rustc and cargo.
|
||||
[build]
|
||||
cargo = "$my_toolchain_dir/bin/cargo"
|
||||
#cargo = "$(rustup which cargo)"
|
||||
#cargo = "$my_toolchain_dir/bin/cargo"
|
||||
cargo = "$(rustup which cargo)"
|
||||
local-rebuild = true
|
||||
rustc = "$my_toolchain_dir/bin/rustc"
|
||||
#rustc = "$HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE/bin/rustc"
|
||||
#rustc = "$my_toolchain_dir/bin/rustc"
|
||||
rustc = "$HOME/.rustup/toolchains/$rust_toolchain-$TARGET_TRIPLE/bin/rustc"
|
||||
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
llvm-filecheck = "`which FileCheck-10 || which FileCheck-11 || which FileCheck-12 || which FileCheck-13 || which FileCheck-14`"
|
||||
@ -359,7 +361,7 @@ function test_rustc() {
|
||||
git checkout tests/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs
|
||||
git checkout tests/ui/macros/rfc-2011-nicer-assert-messages/auxiliary/common.rs
|
||||
|
||||
RUSTC_ARGS="$TEST_FLAGS -Csymbol-mangling-version=v0 -Zcodegen-backend="$(pwd)"/../target/"$CHANNEL"/librustc_codegen_gcc."$dylib_ext""
|
||||
RUSTC_ARGS="$TEST_FLAGS -Csymbol-mangling-version=v0 -Zcodegen-backend="$(pwd)"/../target/"$CHANNEL"/librustc_codegen_gcc."$dylib_ext" --sysroot "$(pwd)"/../build_sysroot/sysroot"
|
||||
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
@ -392,6 +394,7 @@ function test_rustc() {
|
||||
fi
|
||||
|
||||
echo "[TEST] rustc test suite"
|
||||
# FIXME: the problem seems like an ABI incompatibility between cg_gcc sysroot and cg_llvm.
|
||||
COMPILETEST_FORCE_STAGE0=1 ./x.py test --run always --stage 0 tests/ui --rustc-args "$RUSTC_ARGS"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user