Fuel is incompatible with incremental compilation
This commit is contained in:
parent
a73d1bf631
commit
1a47e413b2
@ -2640,9 +2640,13 @@ pub fn build_session_options(
|
||||
handler.early_error("value for threads must be a positive non-zero integer");
|
||||
}
|
||||
|
||||
if unstable_opts.threads > 1 && unstable_opts.fuel.is_some() {
|
||||
let fuel = unstable_opts.fuel.is_some() || unstable_opts.print_fuel.is_some();
|
||||
if fuel && unstable_opts.threads > 1 {
|
||||
handler.early_error("optimization fuel is incompatible with multiple threads");
|
||||
}
|
||||
if fuel && cg.incremental.is_some() {
|
||||
handler.early_error("optimization fuel is incompatible with incremental compilation");
|
||||
}
|
||||
|
||||
let incremental = cg.incremental.as_ref().map(PathBuf::from);
|
||||
|
||||
|
11
tests/ui/invalid-compile-flags/fuel.rs
Normal file
11
tests/ui/invalid-compile-flags/fuel.rs
Normal file
@ -0,0 +1,11 @@
|
||||
// revisions: incremental threads
|
||||
// dont-check-compiler-stderr
|
||||
//
|
||||
// [threads] compile-flags: -Zfuel=a=1 -Zthreads=2
|
||||
// [threads] error-pattern:optimization fuel is incompatible with multiple threads
|
||||
//
|
||||
// [incremental] incremental
|
||||
// [incremental] compile-flags: -Zprint-fuel=a
|
||||
// [incremental] error-pattern:optimization fuel is incompatible with incremental compilation
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user