about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-08-18 18:00:17 -0400
committerNiko Matsakis <niko@alum.mit.edu>2015-09-06 07:27:23 -0400
commit6a2ca37f1bf3a994cb3c58f6be5151638109e5ab (patch)
treebcd885c3761e93ea6d3dfbe257ff4281049dfc3b
parent9bd35c07c2607b93bd889650f42aab4f9e4d5e58 (diff)
downloadrust-6a2ca37f1bf3a994cb3c58f6be5151638109e5ab.tar.gz
rust-6a2ca37f1bf3a994cb3c58f6be5151638109e5ab.zip
add -Z always-build-mir option
-rw-r--r--src/librustc/session/config.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index af9f17f3c6f..b56283e7567 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -104,6 +104,7 @@ 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,
     /// Whether to write dependency files. It's (enabled, optional filename).
@@ -216,6 +217,7 @@ 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(),
         write_dependency_info: (false, None),
@@ -583,6 +585,8 @@ 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,
@@ -894,6 +898,7 @@ 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,6 +1054,7 @@ 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,
         write_dependency_info: write_dependency_info,