Skip to content

Commit

Permalink
compiletest: let config flags overwrite -A unused
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Apr 10, 2020
1 parent 93dc97a commit b973cb7
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 b973cb7

Please sign in to comment.