Merge commit 'ef07e8e60f
' into sync_cg_clif-2023-04-29
This commit is contained in:
commit
a8697f9565
51 changed files with 1469 additions and 675 deletions
|
@ -64,7 +64,7 @@ fn main() {
|
|||
};
|
||||
|
||||
#[cfg(unix)]
|
||||
Command::new("cargo").args(args).exec();
|
||||
panic!("Failed to spawn cargo: {}", Command::new("cargo").args(args).exec());
|
||||
|
||||
#[cfg(not(unix))]
|
||||
std::process::exit(
|
||||
|
|
|
@ -15,22 +15,24 @@ fn main() {
|
|||
env::consts::DLL_PREFIX.to_string() + "rustc_codegen_cranelift" + env::consts::DLL_SUFFIX,
|
||||
);
|
||||
|
||||
let mut args = std::env::args_os().skip(1).collect::<Vec<_>>();
|
||||
let passed_args = std::env::args_os().skip(1).collect::<Vec<_>>();
|
||||
let mut args = vec![];
|
||||
args.push(OsString::from("-Cpanic=abort"));
|
||||
args.push(OsString::from("-Zpanic-abort-tests"));
|
||||
let mut codegen_backend_arg = OsString::from("-Zcodegen-backend=");
|
||||
codegen_backend_arg.push(cg_clif_dylib_path);
|
||||
args.push(codegen_backend_arg);
|
||||
if !args.contains(&OsString::from("--sysroot")) {
|
||||
if !passed_args.contains(&OsString::from("--sysroot")) {
|
||||
args.push(OsString::from("--sysroot"));
|
||||
args.push(OsString::from(sysroot.to_str().unwrap()));
|
||||
}
|
||||
args.extend(passed_args);
|
||||
|
||||
// Ensure that the right toolchain is used
|
||||
env::set_var("RUSTUP_TOOLCHAIN", env!("TOOLCHAIN_NAME"));
|
||||
|
||||
#[cfg(unix)]
|
||||
Command::new("rustc").args(args).exec();
|
||||
panic!("Failed to spawn rustc: {}", Command::new("rustc").args(args).exec());
|
||||
|
||||
#[cfg(not(unix))]
|
||||
std::process::exit(
|
||||
|
|
|
@ -15,22 +15,24 @@ fn main() {
|
|||
env::consts::DLL_PREFIX.to_string() + "rustc_codegen_cranelift" + env::consts::DLL_SUFFIX,
|
||||
);
|
||||
|
||||
let mut args = std::env::args_os().skip(1).collect::<Vec<_>>();
|
||||
let passed_args = std::env::args_os().skip(1).collect::<Vec<_>>();
|
||||
let mut args = vec![];
|
||||
args.push(OsString::from("-Cpanic=abort"));
|
||||
args.push(OsString::from("-Zpanic-abort-tests"));
|
||||
let mut codegen_backend_arg = OsString::from("-Zcodegen-backend=");
|
||||
codegen_backend_arg.push(cg_clif_dylib_path);
|
||||
args.push(codegen_backend_arg);
|
||||
if !args.contains(&OsString::from("--sysroot")) {
|
||||
if !passed_args.contains(&OsString::from("--sysroot")) {
|
||||
args.push(OsString::from("--sysroot"));
|
||||
args.push(OsString::from(sysroot.to_str().unwrap()));
|
||||
}
|
||||
args.extend(passed_args);
|
||||
|
||||
// Ensure that the right toolchain is used
|
||||
env::set_var("RUSTUP_TOOLCHAIN", env!("TOOLCHAIN_NAME"));
|
||||
|
||||
#[cfg(unix)]
|
||||
Command::new("rustdoc").args(args).exec();
|
||||
panic!("Failed to spawn rustdoc: {}", Command::new("rustdoc").args(args).exec());
|
||||
|
||||
#[cfg(not(unix))]
|
||||
std::process::exit(
|
||||
|
|
|
@ -10,7 +10,8 @@ pushd rust
|
|||
|
||||
command -v rg >/dev/null 2>&1 || cargo install ripgrep
|
||||
|
||||
rm -r tests/ui/{extern/,unsized-locals/,lto/,linkage*} || true
|
||||
# FIXME add needs-asm-support to all tests in tests/ui/asm
|
||||
rm -r tests/ui/{unsized-locals/,lto/,linkage*} || true
|
||||
for test in $(rg --files-with-matches "lto|// needs-asm-support|// needs-unwind" tests/{codegen-units,ui,incremental}); do
|
||||
rm $test
|
||||
done
|
||||
|
@ -27,13 +28,24 @@ rm tests/ui/parser/unclosed-delimiter-in-dep.rs # submodule contains //~ERROR
|
|||
# ================
|
||||
|
||||
# requires stack unwinding
|
||||
# FIXME add needs-unwind to these tests
|
||||
rm tests/incremental/change_crate_dep_kind.rs
|
||||
rm tests/incremental/issue-80691-bad-eval-cache.rs # -Cpanic=abort causes abort instead of exit(101)
|
||||
rm -r tests/run-make/c-unwind-abi-catch-lib-panic
|
||||
rm -r tests/run-make/c-unwind-abi-catch-panic
|
||||
rm -r tests/run-make/debug-assertions
|
||||
rm -r tests/run-make/foreign-double-unwind
|
||||
rm -r tests/run-make/foreign-exceptions
|
||||
rm -r tests/run-make/foreign-rust-exceptions
|
||||
rm -r tests/run-make/libtest-json
|
||||
rm -r tests/run-make/static-unwinding
|
||||
|
||||
# requires compiling with -Cpanic=unwind
|
||||
rm -r tests/ui/macros/rfc-2011-nicer-assert-messages/
|
||||
rm -r tests/run-make/test-benches
|
||||
rm tests/ui/test-attrs/test-type.rs
|
||||
rm -r tests/run-make/const_fn_mir
|
||||
rm -r tests/run-make/intrinsic-unreachable
|
||||
|
||||
# vendor intrinsics
|
||||
rm tests/ui/sse2.rs # cpuid not supported, so sse2 not detected
|
||||
|
@ -49,6 +61,7 @@ rm tests/incremental/hashes/statics.rs # same
|
|||
# variadic arguments
|
||||
rm tests/ui/abi/mir/mir_codegen_calls_variadic.rs # requires float varargs
|
||||
rm tests/ui/abi/variadic-ffi.rs # requires callee side vararg support
|
||||
rm -r tests/run-make/c-link-to-rust-va-list-fn # requires callee side vararg support
|
||||
|
||||
# unsized locals
|
||||
rm -r tests/run-pass-valgrind/unsized-locals
|
||||
|
@ -59,6 +72,19 @@ rm tests/ui/target-feature/missing-plusminus.rs # error not implemented
|
|||
rm tests/ui/fn/dyn-fn-alignment.rs # wants a 256 byte alignment
|
||||
rm -r tests/run-make/emit-named-files # requires full --emit support
|
||||
rm -r tests/run-make/repr128-dwarf # debuginfo test
|
||||
rm -r tests/run-make/split-debuginfo # same
|
||||
rm -r tests/run-make/symbols-include-type-name # --emit=asm not supported
|
||||
rm -r tests/run-make/target-specs # i686 not supported by Cranelift
|
||||
rm -r tests/run-make/mismatching-target-triples # same
|
||||
rm -r tests/run-make/use-extern-for-plugins # same
|
||||
|
||||
# requires LTO
|
||||
rm -r tests/run-make/cdylib
|
||||
rm -r tests/run-make/issue-14500
|
||||
rm -r tests/run-make/issue-64153
|
||||
rm -r tests/run-make/codegen-options-parsing
|
||||
rm -r tests/run-make/lto-*
|
||||
rm -r tests/run-make/reproducible-build-2
|
||||
|
||||
# optimization tests
|
||||
# ==================
|
||||
|
@ -70,7 +96,14 @@ rm -r tests/run-make/fmt-write-bloat/ # tests an optimization
|
|||
# backend specific tests
|
||||
# ======================
|
||||
rm tests/incremental/thinlto/cgu_invalidated_when_import_{added,removed}.rs # requires LLVM
|
||||
rm -r tests/run-make/cross-lang-lto # same
|
||||
rm -r tests/run-make/issue-7349 # same
|
||||
rm -r tests/run-make/sepcomp-inlining # same
|
||||
rm -r tests/run-make/sepcomp-separate # same
|
||||
rm -r tests/run-make/sepcomp-cci-copies # same
|
||||
rm -r tests/run-make/volatile-intrinsics # same
|
||||
rm tests/ui/abi/stack-protector.rs # requires stack protector support
|
||||
rm -r tests/run-make/emit-stack-sizes # requires support for -Z emit-stack-sizes
|
||||
|
||||
# giving different but possibly correct results
|
||||
# =============================================
|
||||
|
@ -95,13 +128,12 @@ rm tests/ui/proc-macro/no-missing-docs.rs # same
|
|||
rm tests/ui/rust-2018/proc-macro-crate-in-paths.rs # same
|
||||
rm tests/ui/proc-macro/allowed-signatures.rs # same
|
||||
|
||||
# rustdoc-clif passes extra args, suppressing the help message when no args are passed
|
||||
rm -r tests/run-make/issue-88756-default-output
|
||||
|
||||
# doesn't work due to the way the rustc test suite is invoked.
|
||||
# should work when using ./x.py test the way it is intended
|
||||
# ============================================================
|
||||
rm -r tests/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
|
||||
rm -r tests/run-make/unstable-flag-required # same
|
||||
rm -r tests/run-make/rustdoc-* # same
|
||||
rm -r tests/run-make/issue-88756-default-output # same
|
||||
rm -r tests/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
|
||||
rm -r tests/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere
|
||||
|
||||
|
@ -112,17 +144,41 @@ rm tests/incremental/spike-neg2.rs # same
|
|||
|
||||
rm tests/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered doesn't accept an accumulator for integer vectors
|
||||
|
||||
rm tests/ui/simd/intrinsic/generic-as.rs # crash when accessing vector type field (#1318)
|
||||
rm tests/ui/simd/simd-bitmask.rs # crash
|
||||
|
||||
rm -r tests/run-make/issue-51671 # wrong filename given in case of --emit=obj
|
||||
rm -r tests/run-make/issue-30063 # same
|
||||
rm -r tests/run-make/multiple-emits # same
|
||||
rm -r tests/run-make/output-type-permutations # same
|
||||
rm -r tests/run-make/used # same
|
||||
|
||||
# bugs in the test suite
|
||||
# ======================
|
||||
rm tests/ui/backtrace.rs # TODO warning
|
||||
rm tests/ui/simple_global_asm.rs # TODO add needs-asm-support
|
||||
rm tests/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
|
||||
|
||||
rm tests/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
|
||||
|
||||
cp ../dist/bin/rustdoc-clif ../dist/bin/rustdoc # some tests expect bin/rustdoc to exist
|
||||
|
||||
# prevent $(RUSTDOC) from picking up the sysroot built by x.py. It conflicts with the one used by
|
||||
# rustdoc-clif
|
||||
cat <<EOF | git apply -
|
||||
diff --git a/tests/run-make/tools.mk b/tests/run-make/tools.mk
|
||||
index ea06b620c4c..b969d0009c6 100644
|
||||
--- a/tests/run-make/tools.mk
|
||||
+++ b/tests/run-make/tools.mk
|
||||
@@ -9,7 +9,7 @@ RUSTC_ORIGINAL := \$(RUSTC)
|
||||
BARE_RUSTC := \$(HOST_RPATH_ENV) '\$(RUSTC)'
|
||||
BARE_RUSTDOC := \$(HOST_RPATH_ENV) '\$(RUSTDOC)'
|
||||
RUSTC := \$(BARE_RUSTC) --out-dir \$(TMPDIR) -L \$(TMPDIR) \$(RUSTFLAGS)
|
||||
-RUSTDOC := \$(BARE_RUSTDOC) -L \$(TARGET_RPATH_DIR)
|
||||
+RUSTDOC := \$(BARE_RUSTDOC)
|
||||
ifdef RUSTC_LINKER
|
||||
RUSTC := \$(RUSTC) -Clinker='\$(RUSTC_LINKER)'
|
||||
RUSTDOC := \$(RUSTDOC) -Clinker='\$(RUSTC_LINKER)'
|
||||
EOF
|
||||
|
||||
echo "[TEST] rustc test suite"
|
||||
RUST_TEST_NOCAPTURE=1 COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 tests/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
|
||||
COMPILETEST_FORCE_STAGE0=1 ./x.py test --stage 0 --test-args=--nocapture tests/{codegen-units,run-make,run-pass-valgrind,ui,incremental}
|
||||
popd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue