@@ -104,6 +104,7 @@ pub struct Options {
104
104
pub parse_only : bool ,
105
105
pub no_trans : bool ,
106
106
pub treat_err_as_bug : bool ,
107
+ pub always_build_mir : bool ,
107
108
pub no_analysis : bool ,
108
109
pub debugging_opts : DebuggingOptions ,
109
110
/// Whether to write dependency files. It's (enabled, optional filename).
@@ -216,6 +217,7 @@ pub fn basic_options() -> Options {
216
217
parse_only : false ,
217
218
no_trans : false ,
218
219
treat_err_as_bug : false ,
220
+ always_build_mir : false ,
219
221
no_analysis : false ,
220
222
debugging_opts : basic_debugging_options ( ) ,
221
223
write_dependency_info : ( false , None ) ,
@@ -583,6 +585,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
583
585
"Run all passes except translation; no output" ) ,
584
586
treat_err_as_bug: bool = ( false , parse_bool,
585
587
"Treat all errors that occur as bugs" ) ,
588
+ always_build_mir: bool = ( false , parse_bool,
589
+ "Always build MIR for all fns, even without a #[rustc_mir] annotation" ) ,
586
590
no_analysis: bool = ( false , parse_bool,
587
591
"Parse and expand the source, but run no analysis" ) ,
588
592
extra_plugins: Vec <String > = ( Vec :: new( ) , parse_list,
@@ -894,6 +898,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
894
898
let parse_only = debugging_opts. parse_only ;
895
899
let no_trans = debugging_opts. no_trans ;
896
900
let treat_err_as_bug = debugging_opts. treat_err_as_bug ;
901
+ let always_build_mir = debugging_opts. always_build_mir ;
897
902
let no_analysis = debugging_opts. no_analysis ;
898
903
899
904
if debugging_opts. debug_llvm {
@@ -1049,6 +1054,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
1049
1054
parse_only : parse_only,
1050
1055
no_trans : no_trans,
1051
1056
treat_err_as_bug : treat_err_as_bug,
1057
+ always_build_mir : always_build_mir,
1052
1058
no_analysis : no_analysis,
1053
1059
debugging_opts : debugging_opts,
1054
1060
write_dependency_info : write_dependency_info,
0 commit comments