Don't allow values for codegen-units less than 1 (fixes #32191)

This commit is contained in:
Manish Goregaokar 2016-03-12 16:01:34 +05:30
parent 1a019dc86d
commit 8e3ccd9c9b

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 sysroot_opt = matches.opt_str("sysroot").map(|m| PathBuf::from(&m));