rustc_session: Move more option building code from the options!
macro
This commit is contained in:
parent
2fb1dee14b
commit
9d18d4df0e
4 changed files with 90 additions and 73 deletions
|
@ -685,10 +685,10 @@ impl Default for Options {
|
|||
target_triple: TargetTriple::from_triple(host_triple()),
|
||||
test: false,
|
||||
incremental: None,
|
||||
debugging_opts: basic_debugging_options(),
|
||||
debugging_opts: Default::default(),
|
||||
prints: Vec::new(),
|
||||
borrowck_mode: BorrowckMode::Migrate,
|
||||
cg: basic_codegen_options(),
|
||||
cg: Default::default(),
|
||||
error_format: ErrorOutputType::default(),
|
||||
externs: Externs(BTreeMap::new()),
|
||||
extern_dep_specs: ExternDepSpecs(BTreeMap::new()),
|
||||
|
@ -1925,7 +1925,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
|
|||
|
||||
let (lint_opts, describe_lints, lint_cap) = get_cmd_lint_options(matches, error_format);
|
||||
|
||||
let mut debugging_opts = build_debugging_options(matches, error_format);
|
||||
let mut debugging_opts = DebuggingOptions::build(matches, error_format);
|
||||
check_debug_option_stability(&debugging_opts, error_format, json_rendered);
|
||||
|
||||
if !debugging_opts.unstable_options && json_unused_externs {
|
||||
|
@ -1938,7 +1938,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
|
|||
|
||||
let output_types = parse_output_types(&debugging_opts, matches, error_format);
|
||||
|
||||
let mut cg = build_codegen_options(matches, error_format);
|
||||
let mut cg = CodegenOptions::build(matches, error_format);
|
||||
let (disable_thinlto, mut codegen_units) = should_override_cgus_and_disable_thinlto(
|
||||
&output_types,
|
||||
matches,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue