File tree 3 files changed +13
-17
lines changed
3 files changed +13
-17
lines changed Original file line number Diff line number Diff line change
1
+ use std:: env;
1
2
use std:: fs;
2
3
use std:: path:: { Path , PathBuf } ;
3
4
use std:: process:: Command ;
@@ -259,6 +260,14 @@ fn build_clif_sysroot_for_triple(
259
260
// inlining.
260
261
rustflags. push ( "-Zinline-mir" . to_owned ( ) ) ;
261
262
}
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
+ }
262
271
compiler. rustflags . extend ( rustflags) ;
263
272
let mut build_cmd = STANDARD_LIBRARY . build ( & compiler, dirs) ;
264
273
maybe_incremental ( & mut build_cmd) ;
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -e
3
3
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
5
8
6
9
echo " [SETUP] Rust fork"
7
10
git clone https://github.com/rust-lang/rust.git || true
@@ -32,8 +35,6 @@ verbose-tests = false
32
35
EOF
33
36
popd
34
37
35
- export CFG_VIRTUAL_RUST_SOURCE_BASE_DIR=" $( cd build/stdlib; pwd) "
36
-
37
38
# Allow the testsuite to use llvm tools
38
39
host_triple=$( rustc -vV | grep host | cut -d: -f2 | tr -d " " )
39
40
export 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
111
111
rm tests/ui/layout/valid_range_oob.rs # different ICE message
112
112
rm tests/ui/const-generics/generic_const_exprs/issue-80742.rs # gives error instead of ICE with cg_clif
113
113
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
-
128
114
# rustdoc-clif passes extra args, suppressing the help message when no args are passed
129
115
rm -r tests/run-make/issue-88756-default-output
130
116
You can’t perform that action at this time.
0 commit comments