Move handling of -Dwarnings
to builder.rs
This commit is contained in:
parent
1bec962f46
commit
3a648b6580
2 changed files with 2 additions and 5 deletions
|
@ -111,9 +111,6 @@ fn main() {
|
||||||
cmd.arg("-Zunstable-options");
|
cmd.arg("-Zunstable-options");
|
||||||
cmd.arg("-Wrustc::internal");
|
cmd.arg("-Wrustc::internal");
|
||||||
}
|
}
|
||||||
if env::var_os("RUSTC_DENY_WARNINGS").is_some() {
|
|
||||||
cmd.arg("-Dwarnings");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(target) = target {
|
if let Some(target) = target {
|
||||||
|
|
|
@ -1055,8 +1055,8 @@ impl<'a> Builder<'a> {
|
||||||
|
|
||||||
cargo.env("RUSTC_VERBOSE", self.verbosity.to_string());
|
cargo.env("RUSTC_VERBOSE", self.verbosity.to_string());
|
||||||
|
|
||||||
if self.config.deny_warnings {
|
if self.config.deny_warnings && !mode.is_tool() {
|
||||||
cargo.env("RUSTC_DENY_WARNINGS", "1");
|
rustflags.arg("-Dwarnings");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Throughout the build Cargo can execute a number of build scripts
|
// Throughout the build Cargo can execute a number of build scripts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue