Merge commit '2bb3996244
' into sync_cg_clif-2022-12-14
This commit is contained in:
commit
949699931e
53 changed files with 1675 additions and 1012 deletions
|
@ -2,7 +2,7 @@
|
|||
#![forbid(unsafe_code)]/* This line is ignored by bash
|
||||
# This block is ignored by rustc
|
||||
pushd $(dirname "$0")/../
|
||||
RUSTC="$(pwd)/build/rustc-clif"
|
||||
RUSTC="$(pwd)/dist/rustc-clif"
|
||||
popd
|
||||
PROFILE=$1 OUTPUT=$2 exec $RUSTC -Zunstable-options -Cllvm-args=mode=jit -Cprefer-dynamic $0
|
||||
#*/
|
||||
|
|
36
compiler/rustc_codegen_cranelift/scripts/rustdoc-clif.rs
Normal file
36
compiler/rustc_codegen_cranelift/scripts/rustdoc-clif.rs
Normal file
|
@ -0,0 +1,36 @@
|
|||
use std::env;
|
||||
use std::ffi::OsString;
|
||||
#[cfg(unix)]
|
||||
use std::os::unix::process::CommandExt;
|
||||
use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
|
||||
fn main() {
|
||||
let sysroot = PathBuf::from(env::current_exe().unwrap().parent().unwrap());
|
||||
|
||||
let cg_clif_dylib_path = sysroot.join(if cfg!(windows) { "bin" } else { "lib" }).join(
|
||||
env::consts::DLL_PREFIX.to_string() + "rustc_codegen_cranelift" + env::consts::DLL_SUFFIX,
|
||||
);
|
||||
|
||||
let mut args = std::env::args_os().skip(1).collect::<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")) {
|
||||
args.push(OsString::from("--sysroot"));
|
||||
args.push(OsString::from(sysroot.to_str().unwrap()));
|
||||
}
|
||||
|
||||
// Ensure that the right toolchain is used
|
||||
env::set_var("RUSTUP_TOOLCHAIN", env!("RUSTUP_TOOLCHAIN"));
|
||||
|
||||
#[cfg(unix)]
|
||||
Command::new("rustdoc").args(args).exec();
|
||||
|
||||
#[cfg(not(unix))]
|
||||
std::process::exit(
|
||||
Command::new("rustdoc").args(args).spawn().unwrap().wait().unwrap().code().unwrap_or(1),
|
||||
);
|
||||
}
|
|
@ -27,24 +27,6 @@ index d95b5b7f17f..00b6f0e3635 100644
|
|||
[dev-dependencies]
|
||||
rand = "0.7"
|
||||
rand_xorshift = "0.2"
|
||||
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
|
||||
index 8431aa7b818..a3ff7e68ce5 100644
|
||||
--- a/src/tools/compiletest/src/runtest.rs
|
||||
+++ b/src/tools/compiletest/src/runtest.rs
|
||||
@@ -3489,12 +3489,7 @@ fn normalize_output(&self, output: &str, custom_rules: &[(String, String)]) -> S
|
||||
let compiler_src_dir = base_dir.join("compiler");
|
||||
normalize_path(&compiler_src_dir, "$(echo '$COMPILER_DIR')");
|
||||
|
||||
- if let Some(virtual_rust_source_base_dir) =
|
||||
- option_env!("CFG_VIRTUAL_RUST_SOURCE_BASE_DIR").map(PathBuf::from)
|
||||
- {
|
||||
- normalize_path(&virtual_rust_source_base_dir.join("library"), "$(echo '$SRC_DIR')");
|
||||
- normalize_path(&virtual_rust_source_base_dir.join("compiler"), "$(echo '$COMPILER_DIR')");
|
||||
- }
|
||||
+ normalize_path(&Path::new("$(cd ../build_sysroot/sysroot_src/library; pwd)"), "$(echo '$SRC_DIR')");
|
||||
|
||||
// Paths into the build directory
|
||||
let test_build_dir = &self.config.build_base;
|
||||
EOF
|
||||
|
||||
cat > config.toml <<EOF
|
||||
|
@ -54,7 +36,7 @@ changelog-seen = 2
|
|||
ninja = false
|
||||
|
||||
[build]
|
||||
rustc = "$(pwd)/../build/rustc-clif"
|
||||
rustc = "$(pwd)/../dist/rustc-clif"
|
||||
cargo = "$(rustup which cargo)"
|
||||
full-bootstrap = true
|
||||
local-rebuild = true
|
||||
|
@ -69,6 +51,8 @@ popd
|
|||
# FIXME remove once inline asm is fully supported
|
||||
export RUSTFLAGS="$RUSTFLAGS --cfg=rustix_use_libc"
|
||||
|
||||
export CFG_VIRTUAL_RUST_SOURCE_BASE_DIR="$(cd build_sysroot/sysroot_src; pwd)"
|
||||
|
||||
# Allow the testsuite to use llvm tools
|
||||
host_triple=$(rustc -vV | grep host | cut -d: -f2 | tr -d " ")
|
||||
export LLVM_BIN_DIR="$(rustc --print sysroot)/lib/rustlib/$host_triple/bin"
|
||||
|
|
|
@ -20,6 +20,7 @@ for test in $(rg -i --files-with-matches "//(\[\w+\])?~[^\|]*\s*ERR|// error-pat
|
|||
done
|
||||
|
||||
git checkout -- src/test/ui/issues/auxiliary/issue-3136-a.rs # contains //~ERROR, but shouldn't be removed
|
||||
git checkout -- src/test/ui/proc-macro/pretty-print-hack/
|
||||
|
||||
# missing features
|
||||
# ================
|
||||
|
@ -30,6 +31,7 @@ rm src/test/incremental/issue-80691-bad-eval-cache.rs # -Cpanic=abort causes abo
|
|||
|
||||
# requires compiling with -Cpanic=unwind
|
||||
rm -r src/test/ui/macros/rfc-2011-nicer-assert-messages/
|
||||
rm -r src/test/run-make/test-benches
|
||||
|
||||
# vendor intrinsics
|
||||
rm src/test/ui/sse2.rs # cpuid not supported, so sse2 not detected
|
||||
|
@ -64,6 +66,8 @@ rm src/test/ui/fn/dyn-fn-alignment.rs # wants a 256 byte alignment
|
|||
rm -r src/test/run-make/emit-named-files # requires full --emit support
|
||||
rm src/test/ui/abi/stack-probes.rs # stack probes not yet implemented
|
||||
rm src/test/ui/simd/intrinsic/ptr-cast.rs # simd_expose_addr intrinsic unimplemented
|
||||
rm -r src/test/run-make/repr128-dwarf # debuginfo test
|
||||
rm src/test/codegen-units/item-collection/asm-sym.rs # requires support for sym in asm!()
|
||||
|
||||
# optimization tests
|
||||
# ==================
|
||||
|
@ -82,20 +86,20 @@ rm src/test/ui/abi/stack-protector.rs # requires stack protector support
|
|||
rm src/test/ui/mir/mir_misc_casts.rs # depends on deduplication of constants
|
||||
rm src/test/ui/mir/mir_raw_fat_ptr.rs # same
|
||||
rm src/test/ui/consts/issue-33537.rs # same
|
||||
rm src/test/ui/layout/valid_range_oob.rs # different ICE message
|
||||
|
||||
# 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 src/test/run-make/emit-shared-files # requires the rustdoc executable in build/bin/
|
||||
rm -r src/test/run-make/emit-shared-files # requires the rustdoc executable in dist/bin/
|
||||
rm -r src/test/run-make/unstable-flag-required # same
|
||||
rm -r src/test/run-make/rustdoc-* # same
|
||||
rm -r src/test/run-make/issue-88756-default-output # same
|
||||
rm -r src/test/run-make/remap-path-prefix-dwarf # requires llvm-dwarfdump
|
||||
rm -r src/test/ui/consts/missing_span_in_backtrace.rs # expects sysroot source to be elsewhere
|
||||
|
||||
# genuine bugs
|
||||
# ============
|
||||
rm src/test/ui/allocator/no_std-alloc-error-handler-default.rs # missing rust_oom definition
|
||||
|
||||
rm src/test/incremental/spike-neg1.rs # errors out for some reason
|
||||
rm src/test/incremental/spike-neg2.rs # same
|
||||
rm src/test/ui/issues/issue-74564-if-expr-stack-overflow.rs # gives a stackoverflow before the backend runs
|
||||
|
@ -104,6 +108,8 @@ rm src/test/ui/type-alias-impl-trait/assoc-projection-ice.rs # produces ICE
|
|||
|
||||
rm src/test/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered doesn't accept an accumulator for integer vectors
|
||||
|
||||
rm src/test/ui/runtime/out-of-stack.rs # SIGSEGV instead of SIGABRT for some reason (#1301)
|
||||
|
||||
# bugs in the test suite
|
||||
# ======================
|
||||
rm src/test/ui/backtrace.rs # TODO warning
|
||||
|
@ -111,6 +117,8 @@ rm src/test/ui/simple_global_asm.rs # TODO add needs-asm-support
|
|||
rm src/test/ui/test-attrs/test-type.rs # TODO panic message on stderr. correct stdout
|
||||
# not sure if this is actually a bug in the test suite, but the symbol list shows the function without leading _ for some reason
|
||||
rm -r src/test/run-make/native-link-modifier-bundle
|
||||
rm src/test/ui/process/nofile-limit.rs # TODO some AArch64 linking issue
|
||||
rm src/test/ui/dyn-star/dispatch-on-pin-mut.rs # TODO failed assertion in vtable::get_ptr_and_method_ref
|
||||
|
||||
rm src/test/ui/stdio-is-blocking.rs # really slow with unoptimized libstd
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue