diff options
| author | Andreas Jonson <andjo403@users.noreply.github.com> | 2019-10-09 17:45:19 +0200 |
|---|---|---|
| committer | Andreas Jonson <andjo403@users.noreply.github.com> | 2019-10-09 17:45:19 +0200 |
| commit | 6ae36a37ac1279d2ce20eca927cd89136a15a346 (patch) | |
| tree | b7eaf8d1e84ba0a9b2fa3469b60008dde8703de4 | |
| parent | 7870050796e5904a0fc85ecbe6fa6dde1cfe0c91 (diff) | |
| download | rust-6ae36a37ac1279d2ce20eca927cd89136a15a346.tar.gz rust-6ae36a37ac1279d2ce20eca927cd89136a15a346.zip | |
make it possible to add args to cargo in x.py
eg. make it easier to test -Ztimings for rustc
| -rw-r--r-- | src/bootstrap/builder.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 9b43bb0eff0..b8071b98f70 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -817,12 +817,22 @@ impl<'a> Builder<'a> { let mut rustflags = Rustflags::new(&target); if stage != 0 { + if let Ok(s) = env::var("CARGOFLAGS_NOT_BOOTSTRAP") { + cargo.args(s.split_whitespace()); + } rustflags.env("RUSTFLAGS_NOT_BOOTSTRAP"); } else { + if let Ok(s) = env::var("CARGOFLAGS_BOOTSTRAP") { + cargo.args(s.split_whitespace()); + } rustflags.env("RUSTFLAGS_BOOTSTRAP"); rustflags.arg("--cfg=bootstrap"); } + if let Ok(s) = env::var("CARGOFLAGS") { + cargo.args(s.split_whitespace()); + } + match mode { Mode::Std | Mode::ToolBootstrap | Mode::ToolStd => {}, Mode::Rustc | Mode::Codegen | Mode::ToolRustc => { |
