Skip to content

Commit 5858f6b

Browse files
committed
purge -Z always-build-mir, which is no longer relevant
1 parent e02ddff commit 5858f6b

File tree

3 files changed

+3
-26
lines changed

3 files changed

+3
-26
lines changed

mk/main.mk

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -175,18 +175,6 @@ ifdef CFG_DISABLE_STAGE0_LANDING_PADS
175175
RUSTFLAGS_STAGE0 += -Z no-landing-pads
176176
endif
177177

178-
# Enable MIR to "always build" for crates where this works. This is
179-
# just temporary while MIR is being actively built up -- it's just a
180-
# poor man's unit testing infrastructure. Anyway we only want this for
181-
# stage1/stage2.
182-
define ADD_MIR_FLAG
183-
RUSTFLAGS1_$(1) += -Z always-build-mir
184-
RUSTFLAGS2_$(1) += -Z always-build-mir
185-
endef
186-
$(foreach crate,$(TARGET_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
187-
$(foreach crate,$(RUSTC_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
188-
$(foreach crate,$(HOST_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
189-
190178
# platform-specific auto-configuration
191179
include $(CFG_SRC_DIR)mk/platform.mk
192180

src/librustc/session/config.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ pub struct Options {
101101
pub parse_only: bool,
102102
pub no_trans: bool,
103103
pub treat_err_as_bug: bool,
104-
pub always_build_mir: bool,
105104
pub no_analysis: bool,
106105
pub debugging_opts: DebuggingOptions,
107106
pub prints: Vec<PrintRequest>,
@@ -211,7 +210,6 @@ pub fn basic_options() -> Options {
211210
parse_only: false,
212211
no_trans: false,
213212
treat_err_as_bug: false,
214-
always_build_mir: false,
215213
no_analysis: false,
216214
debugging_opts: basic_debugging_options(),
217215
prints: Vec::new(),
@@ -578,8 +576,6 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
578576
"Run all passes except translation; no output"),
579577
treat_err_as_bug: bool = (false, parse_bool,
580578
"Treat all errors that occur as bugs"),
581-
always_build_mir: bool = (false, parse_bool,
582-
"Always build MIR for all fns, even without a #[rustc_mir] annotation"),
583579
no_analysis: bool = (false, parse_bool,
584580
"Parse and expand the source, but run no analysis"),
585581
extra_plugins: Vec<String> = (Vec::new(), parse_list,
@@ -895,7 +891,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
895891
let parse_only = debugging_opts.parse_only;
896892
let no_trans = debugging_opts.no_trans;
897893
let treat_err_as_bug = debugging_opts.treat_err_as_bug;
898-
let always_build_mir = debugging_opts.always_build_mir;
899894
let no_analysis = debugging_opts.no_analysis;
900895

901896
if debugging_opts.debug_llvm {
@@ -1049,7 +1044,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
10491044
parse_only: parse_only,
10501045
no_trans: no_trans,
10511046
treat_err_as_bug: treat_err_as_bug,
1052-
always_build_mir: always_build_mir,
10531047
no_analysis: no_analysis,
10541048
debugging_opts: debugging_opts,
10551049
prints: prints,

src/librustc_mir/dump.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,14 @@ impl<'a, 'tcx> OuterDump<'a, 'tcx> {
5454
{
5555
let mut built_mir = false;
5656

57+
let mut closure_dump = InnerDump { tcx: self.tcx, attr: None };
5758
for attr in attributes {
5859
if attr.check_name("rustc_mir") {
59-
let mut closure_dump = InnerDump { tcx: self.tcx, attr: Some(attr) };
60-
walk_op(&mut closure_dump);
61-
built_mir = true;
60+
closure_dump.attr = Some(attr);
6261
}
6362
}
6463

65-
let always_build_mir = true;
66-
if !built_mir && always_build_mir {
67-
let mut closure_dump = InnerDump { tcx: self.tcx, attr: None };
68-
walk_op(&mut closure_dump);
69-
}
64+
walk_op(&mut closure_dump);
7065
}
7166
}
7267

0 commit comments

Comments
 (0)