make it possible to add args to cargo in x.py
eg. make it easier to test -Ztimings for rustc
This commit is contained in:
parent
7870050796
commit
6ae36a37ac
1 changed files with 10 additions and 0 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue