Skip to content

Commit d7f7ab9

Browse files
committed
Rollup merge of #32212 - Manishearth:ice-cu, r=eddyb
Don't allow values for codegen-units less than 1 r? @eddyb fixes #32191
2 parents 07b9e89 + 8e3ccd9 commit d7f7ab9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/librustc/session/config.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,10 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
10951095
}
10961096
}
10971097

1098+
if cg.codegen_units < 1 {
1099+
early_error(error_format, "Value for codegen units must be a positive nonzero integer");
1100+
}
1101+
10981102
let cg = cg;
10991103

11001104
let sysroot_opt = matches.opt_str("sysroot").map(|m| PathBuf::from(&m));

0 commit comments

Comments
 (0)