Skip to content

Commit c670293

Browse files
committed
Adding a deprecation warning for no-stack-check codegen option.
1 parent c2a1c7f commit c670293

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/librustc/session/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2444,4 +2444,4 @@ mod tests {
24442444
opts.debugging_opts.mir_opt_level = Some(1);
24452445
assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
24462446
}
2447-
}
2447+
}

src/librustc_driver/lib.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ use rustc::dep_graph::DepGraph;
7575
use rustc::session::{self, config, Session, build_session, CompileResult};
7676
use rustc::session::config::{Input, PrintRequest, OutputType, ErrorOutputType};
7777
use rustc::session::config::nightly_options;
78-
use rustc::session::early_error;
78+
use rustc::session::{early_error, early_warn};
7979
use rustc::lint::Lint;
8080
use rustc::lint;
8181
use rustc_metadata::locator;
@@ -1011,6 +1011,11 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
10111011
return None;
10121012
}
10131013

1014+
if cg_flags.iter().any(|x| *x == "no-stack-check") {
1015+
early_warn(ErrorOutputType::default(),
1016+
"the --no-stack-check flag is deprecated and does nothing");
1017+
}
1018+
10141019
if cg_flags.contains(&"passes=list".to_string()) {
10151020
unsafe {
10161021
::llvm::LLVMRustPrintPasses();

0 commit comments

Comments
 (0)