diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2019-09-11 08:06:25 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2019-09-23 09:34:44 -0700 |
| commit | ff6a7c77aecc0e1dcf15491a04c0cb815dec489e (patch) | |
| tree | 4b2808b5c100e18dc22e763e5f8321defd06e77a /src/bootstrap | |
| parent | 7342325dfbd2560ebfd1b95073a20dfc56bd0298 (diff) | |
| download | rust-ff6a7c77aecc0e1dcf15491a04c0cb815dec489e.tar.gz rust-ff6a7c77aecc0e1dcf15491a04c0cb815dec489e.zip | |
No need to remove target-specific RUSTFLAGS
Turns out Cargo favors RUSTFLAGS!
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 9046eded381..aa433690436 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -815,7 +815,7 @@ impl<'a> Builder<'a> { stage = compiler.stage; } - let mut rustflags = Rustflags::new(&target, &mut cargo); + let mut rustflags = Rustflags::new(&target); if stage != 0 { rustflags.env("RUSTFLAGS_NOT_BOOTSTRAP"); } else { @@ -1339,18 +1339,16 @@ mod tests; struct Rustflags(String); impl Rustflags { - fn new(target: &str, cmd: &mut Command) -> Rustflags { + fn new(target: &str) -> Rustflags { let mut ret = Rustflags(String::new()); // Inherit `RUSTFLAGS` by default ... ret.env("RUSTFLAGS"); // ... and also handle target-specific env RUSTFLAGS if they're - // configured. If this is configured we also remove it from the - // environment because Cargo will prefer it over RUSTFLAGS. + // configured. let target_specific = format!("CARGO_TARGET_{}_RUSTFLAGS", crate::envify(target)); ret.env(&target_specific); - cmd.env_remove(&target_specific); ret } |
