Rollup merge of #37636 - karpinski:issue-34915, r=nikomatsakis

Marking the 'no-stack-check' codegen option as deprecated (Issue #34915)

Attempts to finish resolving issue #34915. Based on pull request #35156, which was closed due to inactivity.
This commit is contained in:
Eduard-Mihai Burtescu 2016-11-09 20:51:19 +02:00 committed by GitHub
commit 3292f407e7
2 changed files with 7 additions and 2 deletions

View File

@ -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"),

View File

@ -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;
@ -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();