Skip to content

Commit

Permalink
Adding a deprecation warning for no-stack-check codegen option.
Browse files Browse the repository at this point in the history
  • Loading branch information
karpinski committed Nov 8, 2016
1 parent c2a1c7f commit c670293
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/librustc/session/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2444,4 +2444,4 @@ mod tests {
opts.debugging_opts.mir_opt_level = Some(1);
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
}
}
}
7 changes: 6 additions & 1 deletion src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit c670293

Please sign in to comment.