Skip to content

Commit d0ab04a

Browse files
committed
Simplify mock rustc wrapper.
1 parent 53a3db0 commit d0ab04a

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

tests/testsuite/standard_lib.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,7 @@ fn setup() -> Option<Setup> {
9090
fn main() {
9191
let mut args = env::args().skip(1).collect::<Vec<_>>();
9292
93-
let crates = [
94-
"alloc",
95-
"compiler_builtins",
96-
"core",
97-
"panic_unwind",
98-
"proc_macro",
99-
"std",
100-
"test",
101-
];
102-
let is_sysroot_crate = args.iter()
103-
.any(|a| a.starts_with("rustc_std_workspace") || crates.iter().any(|b| a == b));
104-
93+
let is_sysroot_crate = env::var_os("RUSTC_BOOTSTRAP").is_some();
10594
if is_sysroot_crate {
10695
let arg = args.iter().position(|a| a == "--sysroot").unwrap();
10796
args[arg + 1] = env::var("REAL_SYSROOT").unwrap();

0 commit comments

Comments
 (0)