]> git.lizzy.rs Git - rust.git/commitdiff
Adding a deprecation warning for no-stack-check codegen option.
authorkarpinski <marcinpkarpinski@gmail.com>
Mon, 7 Nov 2016 17:38:47 +0000 (18:38 +0100)
committerkarpinski <marcinpkarpinski@gmail.com>
Tue, 8 Nov 2016 12:45:07 +0000 (13:45 +0100)
src/librustc/session/config.rs
src/librustc_driver/lib.rs

index fd63f7398d202ae8b09441010bd71ae9ad0232be..16522a73f56a514fa2b551f47545edc00014753f 100644 (file)
@@ -2444,4 +2444,4 @@ fn test_debugging_options_tracking_hash() {
         opts.debugging_opts.mir_opt_level = Some(1);
         assert!(reference.dep_tracking_hash() != opts.dep_tracking_hash());
     }
-}
\ No newline at end of file
+}
index cb78baa12a6ad052f5c08170eef8c119fe4412ca..2699682fb3023b972dca1396cfd421061adf6f61 100644 (file)
@@ -75,7 +75,7 @@
 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();