Skip to content

Commit

Permalink
Rollup merge of rust-lang#37636 - karpinski:issue-34915, r=nikomatsakis
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eddyb authored Nov 9, 2016
2 parents e0894ca + c670293 commit 3292f40
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 @@ -793,7 +793,7 @@ options! {CodegenOptions, CodegenSetter, basic_codegen_options,
remark: Passes = (SomePasses(Vec::new()), parse_passes, [UNTRACKED],
"print remarks for these optimization passes (space separated, or \"all\")"),
no_stack_check: bool = (false, parse_bool, [UNTRACKED],
"disable checks for stack exhaustion (a memory-safety hazard!)"),
"the --no-stack-check flag is deprecated and does nothing"),
debuginfo: Option<usize> = (None, parse_opt_uint, [TRACKED],
"debug info emission level, 0 = no debug info, 1 = line tables only, \
2 = full debug info with variable and type information"),
Expand Down
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 3292f40

Please sign in to comment.