Skip to content

Commit ac29809

Browse files
committed
bootstrap: Move RUSTC_CRT_STATIC to builder.rs
1 parent 04cb065 commit ac29809

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/bootstrap/bin/rustc.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,13 +232,8 @@ fn main() {
232232
}
233233
}
234234

235-
if let Ok(s) = env::var("RUSTC_CRT_STATIC") {
236-
if s == "true" {
237-
cmd.arg("-C").arg("target-feature=+crt-static");
238-
}
239-
if s == "false" {
240-
cmd.arg("-C").arg("target-feature=-crt-static");
241-
}
235+
if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") {
236+
cmd.arg("--remap-path-prefix").arg(&map);
242237
}
243238
} else {
244239
// Override linker if necessary.

src/bootstrap/builder.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,11 @@ impl<'a> Builder<'a> {
945945
}
946946

947947
if let Some(x) = self.crt_static(target) {
948-
cargo.env("RUSTC_CRT_STATIC", x.to_string());
948+
if x {
949+
rustflags.arg("-Ctarget-feature=+crt-static");
950+
} else {
951+
rustflags.arg("-Ctarget-feature=-crt-static");
952+
}
949953
}
950954

951955
if let Some(x) = self.crt_static(compiler.host) {

0 commit comments

Comments
 (0)