mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 21:15:18 +03:00
Move handling of -Dwarnings to builder.rs
This commit is contained in:
@@ -111,9 +111,6 @@ fn main() {
|
||||
cmd.arg("-Zunstable-options");
|
||||
cmd.arg("-Wrustc::internal");
|
||||
}
|
||||
if env::var_os("RUSTC_DENY_WARNINGS").is_some() {
|
||||
cmd.arg("-Dwarnings");
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(target) = target {
|
||||
|
||||
@@ -1055,8 +1055,8 @@ pub fn cargo(
|
||||
|
||||
cargo.env("RUSTC_VERBOSE", self.verbosity.to_string());
|
||||
|
||||
if self.config.deny_warnings {
|
||||
cargo.env("RUSTC_DENY_WARNINGS", "1");
|
||||
if self.config.deny_warnings && !mode.is_tool() {
|
||||
rustflags.arg("-Dwarnings");
|
||||
}
|
||||
|
||||
// Throughout the build Cargo can execute a number of build scripts
|
||||
|
||||
Reference in New Issue
Block a user