Skip to content

Commit

Permalink
Rollup merge of #70978 - RalfJung:compiletest-flags, r=Mark-Simulacrum
Browse files Browse the repository at this point in the history
compiletest: let config flags overwrite -A unused

Cc Manishearth/compiletest-rs#216
  • Loading branch information
Centril committed Apr 10, 2020
2 parents 0d89287 + b973cb7 commit a5e06f2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/tools/compiletest/src/runtest.rs
Expand Up @@ -1958,6 +1958,12 @@ impl<'test> TestCx<'test> {
None => {}
}

// Add `-A unused` before `config` flags and in-test (`props`) flags, so that they can
// overwrite this.
if let AllowUnused::Yes = allow_unused {
rustc.args(&["-A", "unused"]);
}

if self.props.force_host {
self.maybe_add_external_args(
&mut rustc,
Expand All @@ -1980,10 +1986,6 @@ impl<'test> TestCx<'test> {
rustc.arg("-Ctarget-feature=-crt-static");
}

if let AllowUnused::Yes = allow_unused {
rustc.args(&["-A", "unused"]);
}

rustc.args(&self.props.compile_flags);

rustc
Expand Down

0 comments on commit a5e06f2

Please sign in to comment.