Skip to content

Commit 3292f40

Browse files
authored
Rollup merge of rust-lang#37636 - karpinski:issue-34915, r=nikomatsakis
Marking the 'no-stack-check' codegen option as deprecated (Issue rust-lang#34915) Attempts to finish resolving issue rust-lang#34915. Based on pull request rust-lang#35156, which was closed due to inactivity.
2 parents e0894ca + c670293 commit 3292f40

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
@@ -793,7 +793,7 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
793793
remark: Passes = (SomePasses(Vec::new()), parse_passes, [UNTRACKED],
794794
"print remarks for these optimization passes (space separated, or \"all\")"),
795795
no_stack_check: bool = (false, parse_bool, [UNTRACKED],
796-
"disable checks for stack exhaustion (a memory-safety hazard!)"),
796+
"the --no-stack-check flag is deprecated and does nothing"),
797797
debuginfo: Option<usize> = (None, parse_opt_uint, [TRACKED],
798798
"debug info emission level, 0 = no debug info, 1 = line tables only, \
799799
2 = full debug info with variable and type information"),

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)