compiletest: let config flags overwrite -A unused
This commit is contained in:
parent
93dc97a853
commit
b973cb70bf
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user