Adding a deprecation warning for no-stack-check codegen option.

This commit is contained in:
karpinski 2016-11-07 18:38:47 +01:00
parent c2a1c7f44f
commit c670293630
2 changed files with 7 additions and 2 deletions

View file

@ -2444,4 +2444,4 @@ mod tests {
opts.debugging_opts.mir_opt_level = Some(1);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
}
}
}

View file

@ -75,7 +75,7 @@ use rustc::dep_graph::DepGraph;
use rustc::session::{self, config, Session, build_session, CompileResult};
use rustc::session::config::{Input, PrintRequest, OutputType, ErrorOutputType};
use rustc::session::config::nightly_options;
use rustc::session::early_error;
use rustc::session::{early_error, early_warn};
use rustc::lint::Lint;
use rustc::lint;
use rustc_metadata::locator;
@ -1011,6 +1011,11 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
return None;
}
if cg_flags.iter().any(|x| *x == "no-stack-check") {
early_warn(ErrorOutputType::default(),
"the --no-stack-check flag is deprecated and does nothing");
}
if cg_flags.contains(&"passes=list".to_string()) {
unsafe {
::llvm::LLVMRustPrintPasses();