This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-17
lines changed Expand file tree Collapse file tree 3 files changed +13
-17
lines changed Original file line number Diff line number Diff line change 1+ use std:: env;
12use std:: fs;
23use std:: path:: { Path , PathBuf } ;
34use std:: process:: Command ;
@@ -259,6 +260,14 @@ fn build_clif_sysroot_for_triple(
259260 // inlining.
260261 rustflags. push ( "-Zinline-mir" . to_owned ( ) ) ;
261262 }
263+ if let Some ( prefix) = env:: var_os ( "CG_CLIF_STDLIB_REMAP_PATH_PREFIX" ) {
264+ rustflags. push ( "--remap-path-prefix" . to_owned ( ) ) ;
265+ rustflags. push ( format ! (
266+ "{}={}" ,
267+ STDLIB_SRC . to_path( dirs) . to_str( ) . unwrap( ) ,
268+ prefix. to_str( ) . unwrap( )
269+ ) ) ;
270+ }
262271 compiler. rustflags . extend ( rustflags) ;
263272 let mut build_cmd = STANDARD_LIBRARY . build ( & compiler, dirs) ;
264273 maybe_incremental ( & mut build_cmd) ;
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -e
33
4- ./y.sh build
4+ # Compiletest expects all standard library paths to start with /rustc/FAKE_PREFIX.
5+ # CG_CLIF_STDLIB_REMAP_PATH_PREFIX will cause cg_clif's build system to pass
6+ # --remap-path-prefix to handle this.
7+ CG_CLIF_STDLIB_REMAP_PATH_PREFIX=/rustc/FAKE_PREFIX ./y.sh build
58
69echo " [SETUP] Rust fork"
710git clone https://github.com/rust-lang/rust.git || true
@@ -32,8 +35,6 @@ verbose-tests = false
3235EOF
3336popd
3437
35- export CFG_VIRTUAL_RUST_SOURCE_BASE_DIR=" $( cd build/stdlib; pwd) "
36-
3738# Allow the testsuite to use llvm tools
3839host_triple=$( rustc -vV | grep host | cut -d: -f2 | tr -d " " )
3940export LLVM_BIN_DIR=" $( rustc --print sysroot) /lib/rustlib/$host_triple /bin"
Original file line number Diff line number Diff line change @@ -111,20 +111,6 @@ rm tests/ui/consts/issue-33537.rs # same
111111rm tests/ui/layout/valid_range_oob.rs # different ICE message
112112rm tests/ui/const-generics/generic_const_exprs/issue-80742.rs # gives error instead of ICE with cg_clif
113113
114- rm tests/ui/consts/issue-miri-1910.rs # different error message
115- rm tests/ui/consts/offset_ub.rs # same
116- rm tests/ui/consts/const-eval/ub-slice-get-unchecked.rs # same
117- rm tests/ui/intrinsics/panic-uninitialized-zeroed.rs # same
118- rm tests/ui/lint/lint-const-item-mutation.rs # same
119- rm tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.rs # same
120- rm tests/ui/suggestions/derive-trait-for-method-call.rs # same
121- rm tests/ui/typeck/issue-46112.rs # same
122- rm tests/ui/consts/const_cmp_type_id.rs # same
123- rm tests/ui/consts/issue-73976-monomorphic.rs # same
124- rm tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs # same
125- rm tests/ui/consts/issue-94675.rs # same
126- rm tests/ui/associated-types/issue-85103-layout-debug.rs # same
127-
128114# rustdoc-clif passes extra args, suppressing the help message when no args are passed
129115rm -r tests/run-make/issue-88756-default-output
130116
You can’t perform that action at this time.
0 commit comments