Skip to content

Commit a03e769

Browse files
committed
Improve standard library source remapping
1 parent 4d0b725 commit a03e769

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

build_system/build_sysroot.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,7 @@ fn build_clif_sysroot_for_triple(
235235

236236
if let Some(prefix) = env::var_os("CG_CLIF_STDLIB_REMAP_PATH_PREFIX") {
237237
rustflags.push("--remap-path-prefix".to_owned());
238-
rustflags.push(format!(
239-
"{}={}",
240-
STDLIB_SRC.to_path(dirs).to_str().unwrap(),
241-
prefix.to_str().unwrap()
242-
));
238+
rustflags.push(format!("library/={}/library", prefix.to_str().unwrap()));
243239
}
244240
compiler.rustflags.extend(rustflags);
245241
let mut build_cmd = STANDARD_LIBRARY.build(&compiler, dirs);

scripts/test_rustc_tests.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,8 @@ rm tests/ui/errors/remap-path-prefix-sysroot.rs # different sysroot source path
152152
rm -r tests/run-make/export/extern-opt # something about rustc version mismatches
153153
rm -r tests/run-make/export # same
154154
rm -r tests/ui/compiletest-self-test/compile-flags-incremental.rs # needs compiletest compiled with panic=unwind
155-
rm tests/ui/async-await/in-trait/dont-project-to-specializable-projection.rs # something going wrong with stdlib source remapping
156-
rm tests/ui/consts/miri_unleashed/drop.rs # same
157-
rm tests/ui/error-emitter/multiline-removal-suggestion.rs # same
158-
rm tests/ui/lint/lint-const-item-mutation.rs # same
159-
rm tests/ui/lint/use-redundant/use-redundant-issue-71450.rs # same
160-
rm tests/ui/lint/use-redundant/use-redundant-prelude-rust-2021.rs # same
161-
rm tests/ui/specialization/const_trait_impl.rs # same
162-
rm tests/ui/thir-print/offset_of.rs # same
163-
rm tests/ui/traits/const-traits/const_closure-const_trait_impl-ice-113381.rs # same
155+
rm -r tests/ui/extern/extern-types-field-offset.rs # expects /rustc/<hash> rather than /rustc/FAKE_PREFIX
156+
rm -r tests/ui/process/println-with-broken-pipe.rs # same
164157

165158
# genuine bugs
166159
# ============

0 commit comments

Comments
 (0)