Skip to content

Commit 3a648b6

Browse files
committed
Move handling of -Dwarnings to builder.rs
1 parent 1bec962 commit 3a648b6

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/bootstrap/bin/rustc.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,6 @@ fn main() {
111111
cmd.arg("-Zunstable-options");
112112
cmd.arg("-Wrustc::internal");
113113
}
114-
if env::var_os("RUSTC_DENY_WARNINGS").is_some() {
115-
cmd.arg("-Dwarnings");
116-
}
117114
}
118115

119116
if let Some(target) = target {

src/bootstrap/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,8 +1055,8 @@ impl<'a> Builder<'a> {
10551055

10561056
cargo.env("RUSTC_VERBOSE", self.verbosity.to_string());
10571057

1058-
if self.config.deny_warnings {
1059-
cargo.env("RUSTC_DENY_WARNINGS", "1");
1058+
if self.config.deny_warnings && !mode.is_tool() {
1059+
rustflags.arg("-Dwarnings");
10601060
}
10611061

10621062
// Throughout the build Cargo can execute a number of build scripts

0 commit comments

Comments
 (0)