bootstrap: Move RUSTC_CRT_STATIC
to builder.rs
This commit is contained in:
parent
04cb0653a8
commit
ac29809940
@ -232,13 +232,8 @@ fn main() {
|
||||
}
|
||||
}
|
||||
|
||||
if let Ok(s) = env::var("RUSTC_CRT_STATIC") {
|
||||
if s == "true" {
|
||||
cmd.arg("-C").arg("target-feature=+crt-static");
|
||||
}
|
||||
if s == "false" {
|
||||
cmd.arg("-C").arg("target-feature=-crt-static");
|
||||
}
|
||||
if let Ok(map) = env::var("RUSTC_DEBUGINFO_MAP") {
|
||||
cmd.arg("--remap-path-prefix").arg(&map);
|
||||
}
|
||||
} else {
|
||||
// Override linker if necessary.
|
||||
|
@ -945,7 +945,11 @@ impl<'a> Builder<'a> {
|
||||
}
|
||||
|
||||
if let Some(x) = self.crt_static(target) {
|
||||
cargo.env("RUSTC_CRT_STATIC", x.to_string());
|
||||
if x {
|
||||
rustflags.arg("-Ctarget-feature=+crt-static");
|
||||
} else {
|
||||
rustflags.arg("-Ctarget-feature=-crt-static");
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(x) = self.crt_static(compiler.host) {
|
||||
|
Loading…
Reference in New Issue
Block a user