diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-04-10 18:15:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-10 18:15:21 +0200 |
| commit | a5e06f28c7bd0e1902dff5590bc00ecd92eccfb7 (patch) | |
| tree | 5f0095d3e5d3427821db504b996ff3339e336d33 | |
| parent | 0d892873d84c3aca95715eb162d5941e278761ef (diff) | |
| parent | b973cb70bf9afefbbd987d23137416bf3c4037cb (diff) | |
| download | rust-a5e06f28c7bd0e1902dff5590bc00ecd92eccfb7.tar.gz rust-a5e06f28c7bd0e1902dff5590bc00ecd92eccfb7.zip | |
Rollup merge of #70978 - RalfJung:compiletest-flags, r=Mark-Simulacrum
compiletest: let config flags overwrite -A unused Cc https://github.com/laumann/compiletest-rs/issues/216
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index 26a9cd11997..2944864abbf 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -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, @@ -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 |
