purge `-Z always-build-mir`, which is no longer relevant

This commit is contained in:
Niko Matsakis 2015-10-06 10:48:11 -04:00
parent e02ddff816
commit 5858f6bd67
3 changed files with 3 additions and 26 deletions

View File

@ -175,18 +175,6 @@ ifdef CFG_DISABLE_STAGE0_LANDING_PADS
RUSTFLAGS_STAGE0 += -Z no-landing-pads
endif
# Enable MIR to "always build" for crates where this works. This is
# just temporary while MIR is being actively built up -- it's just a
# poor man's unit testing infrastructure. Anyway we only want this for
# stage1/stage2.
define ADD_MIR_FLAG
RUSTFLAGS1_$(1) += -Z always-build-mir
RUSTFLAGS2_$(1) += -Z always-build-mir
endef
$(foreach crate,$(TARGET_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
$(foreach crate,$(RUSTC_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
$(foreach crate,$(HOST_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
# platform-specific auto-configuration
include $(CFG_SRC_DIR)mk/platform.mk

View File

@ -101,7 +101,6 @@ pub struct Options {
pub parse_only: bool,
pub no_trans: bool,
pub treat_err_as_bug: bool,
pub always_build_mir: bool,
pub no_analysis: bool,
pub debugging_opts: DebuggingOptions,
pub prints: Vec<PrintRequest>,
@ -211,7 +210,6 @@ pub fn basic_options() -> Options {
parse_only: false,
no_trans: false,
treat_err_as_bug: false,
always_build_mir: false,
no_analysis: false,
debugging_opts: basic_debugging_options(),
prints: Vec::new(),
@ -578,8 +576,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
"Run all passes except translation; no output"),
treat_err_as_bug: bool = (false, parse_bool,
"Treat all errors that occur as bugs"),
always_build_mir: bool = (false, parse_bool,
"Always build MIR for all fns, even without a #[rustc_mir] annotation"),
no_analysis: bool = (false, parse_bool,
"Parse and expand the source, but run no analysis"),
extra_plugins: Vec<String> = (Vec::new(), parse_list,
@ -895,7 +891,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
let parse_only = debugging_opts.parse_only;
let no_trans = debugging_opts.no_trans;
let treat_err_as_bug = debugging_opts.treat_err_as_bug;
let always_build_mir = debugging_opts.always_build_mir;
let no_analysis = debugging_opts.no_analysis;
if debugging_opts.debug_llvm {
@ -1049,7 +1044,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
parse_only: parse_only,
no_trans: no_trans,
treat_err_as_bug: treat_err_as_bug,
always_build_mir: always_build_mir,
no_analysis: no_analysis,
debugging_opts: debugging_opts,
prints: prints,

View File

@ -54,19 +54,14 @@ impl<'a, 'tcx> OuterDump<'a, 'tcx> {
{
let mut built_mir = false;
let mut closure_dump = InnerDump { tcx: self.tcx, attr: None };
for attr in attributes {
if attr.check_name("rustc_mir") {
let mut closure_dump = InnerDump { tcx: self.tcx, attr: Some(attr) };
walk_op(&mut closure_dump);
built_mir = true;
closure_dump.attr = Some(attr);
}
}
let always_build_mir = true;
if !built_mir && always_build_mir {
let mut closure_dump = InnerDump { tcx: self.tcx, attr: None };
walk_op(&mut closure_dump);
}
walk_op(&mut closure_dump);
}
}