Rollup merge of #32212 - Manishearth:ice-cu, r=eddyb

Don't allow values for codegen-units less than 1

r? @eddyb

fixes #32191
This commit is contained in:
Manish Goregaokar 2016-03-13 19:33:27 +05:30
commit d7f7ab9646

View File

@ -1095,6 +1095,10 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
} }
} }
if cg.codegen_units < 1 {
early_error(error_format, "Value for codegen units must be a positive nonzero integer");
}
let cg = cg; let cg = cg;
let sysroot_opt = matches.opt_str("sysroot").map(|m| PathBuf::from(&m)); let sysroot_opt = matches.opt_str("sysroot").map(|m| PathBuf::from(&m));