From 6a2ca37f1bf3a994cb3c58f6be5151638109e5ab Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Tue, 18 Aug 2015 18:00:17 -0400 Subject: [PATCH] add -Z always-build-mir option --- src/librustc/session/config.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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 = (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,