Moved experimental compiler flags to -Z (#4740)
This commit is contained in:
parent
6e9298ab88
commit
b8943474dc
@ -521,9 +521,6 @@ pub fn build_session_options(+binary: ~str,
|
|||||||
} else {
|
} else {
|
||||||
session::unknown_crate
|
session::unknown_crate
|
||||||
};
|
};
|
||||||
let static = opt_present(matches, ~"static");
|
|
||||||
let gc = opt_present(matches, ~"gc");
|
|
||||||
|
|
||||||
let parse_only = opt_present(matches, ~"parse-only");
|
let parse_only = opt_present(matches, ~"parse-only");
|
||||||
let no_trans = opt_present(matches, ~"no-trans");
|
let no_trans = opt_present(matches, ~"no-trans");
|
||||||
|
|
||||||
@ -570,7 +567,6 @@ pub fn build_session_options(+binary: ~str,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let jit = opt_present(matches, ~"jit");
|
|
||||||
let output_type =
|
let output_type =
|
||||||
if parse_only || no_trans {
|
if parse_only || no_trans {
|
||||||
link::output_type_none
|
link::output_type_none
|
||||||
@ -584,8 +580,6 @@ pub fn build_session_options(+binary: ~str,
|
|||||||
} else if opt_present(matches, ~"emit-llvm") {
|
} else if opt_present(matches, ~"emit-llvm") {
|
||||||
link::output_type_bitcode
|
link::output_type_bitcode
|
||||||
} else { link::output_type_exe };
|
} else { link::output_type_exe };
|
||||||
let extra_debuginfo = opt_present(matches, ~"xg");
|
|
||||||
let debuginfo = opt_present(matches, ~"g") || extra_debuginfo;
|
|
||||||
let sysroot_opt = getopts::opt_maybe_str(matches, ~"sysroot");
|
let sysroot_opt = getopts::opt_maybe_str(matches, ~"sysroot");
|
||||||
let sysroot_opt = sysroot_opt.map(|m| Path(*m));
|
let sysroot_opt = sysroot_opt.map(|m| Path(*m));
|
||||||
let target_opt = getopts::opt_maybe_str(matches, ~"target");
|
let target_opt = getopts::opt_maybe_str(matches, ~"target");
|
||||||
@ -616,6 +610,12 @@ pub fn build_session_options(+binary: ~str,
|
|||||||
}
|
}
|
||||||
} else { No }
|
} else { No }
|
||||||
};
|
};
|
||||||
|
let gc = debugging_opts & session::gc != 0;
|
||||||
|
let jit = debugging_opts & session::jit != 0;
|
||||||
|
let extra_debuginfo = debugging_opts & session::extra_debug_info != 0;
|
||||||
|
let debuginfo = debugging_opts & session::debug_info != 0 ||
|
||||||
|
extra_debuginfo;
|
||||||
|
let static = debugging_opts & session::static != 0;
|
||||||
let target =
|
let target =
|
||||||
match target_opt {
|
match target_opt {
|
||||||
None => host_triple(),
|
None => host_triple(),
|
||||||
@ -712,14 +712,11 @@ pub fn optgroups() -> ~[getopts::groups::OptGroup] {
|
|||||||
environment", ~"SPEC"),
|
environment", ~"SPEC"),
|
||||||
optflag(~"", ~"emit-llvm",
|
optflag(~"", ~"emit-llvm",
|
||||||
~"Produce an LLVM bitcode file"),
|
~"Produce an LLVM bitcode file"),
|
||||||
optflag(~"g", ~"", ~"Produce debug info (experimental)"),
|
|
||||||
optflag(~"", ~"gc", ~"Garbage collect shared data (experimental)"),
|
|
||||||
optflag(~"h", ~"help",~"Display this message"),
|
optflag(~"h", ~"help",~"Display this message"),
|
||||||
optmulti(~"L", ~"", ~"Add a directory to the library search path",
|
optmulti(~"L", ~"", ~"Add a directory to the library search path",
|
||||||
~"PATH"),
|
~"PATH"),
|
||||||
optflag(~"", ~"lib", ~"Compile a library crate"),
|
optflag(~"", ~"lib", ~"Compile a library crate"),
|
||||||
optflag(~"", ~"ls", ~"List the symbols defined by a library crate"),
|
optflag(~"", ~"ls", ~"List the symbols defined by a library crate"),
|
||||||
optflag(~"", ~"jit", ~"Execute using JIT (experimental)"),
|
|
||||||
optflag(~"", ~"no-trans",
|
optflag(~"", ~"no-trans",
|
||||||
~"Run all passes except translation; no output"),
|
~"Run all passes except translation; no output"),
|
||||||
optflag(~"O", ~"", ~"Equivalent to --opt-level=2"),
|
optflag(~"O", ~"", ~"Equivalent to --opt-level=2"),
|
||||||
@ -739,13 +736,9 @@ pub fn optgroups() -> ~[getopts::groups::OptGroup] {
|
|||||||
or identified (fully parenthesized,
|
or identified (fully parenthesized,
|
||||||
AST nodes and blocks with IDs)", ~"TYPE"),
|
AST nodes and blocks with IDs)", ~"TYPE"),
|
||||||
optflag(~"S", ~"", ~"Compile only; do not assemble or link"),
|
optflag(~"S", ~"", ~"Compile only; do not assemble or link"),
|
||||||
optflag(~"", ~"xg", ~"Extra debugging info (experimental)"),
|
|
||||||
optflag(~"", ~"save-temps",
|
optflag(~"", ~"save-temps",
|
||||||
~"Write intermediate files (.bc, .opt.bc, .o)
|
~"Write intermediate files (.bc, .opt.bc, .o)
|
||||||
in addition to normal output"),
|
in addition to normal output"),
|
||||||
optflag(~"", ~"static",
|
|
||||||
~"Use or produce static libraries or binaries
|
|
||||||
(experimental)"),
|
|
||||||
optopt(~"", ~"sysroot",
|
optopt(~"", ~"sysroot",
|
||||||
~"Override the system root", ~"PATH"),
|
~"Override the system root", ~"PATH"),
|
||||||
optflag(~"", ~"test", ~"Build a test harness"),
|
optflag(~"", ~"test", ~"Build a test harness"),
|
||||||
|
@ -75,6 +75,11 @@ pub enum crate_type { bin_crate, lib_crate, unknown_crate, }
|
|||||||
pub const meta_stats: uint = 1 << 15;
|
pub const meta_stats: uint = 1 << 15;
|
||||||
pub const no_opt: uint = 1 << 16;
|
pub const no_opt: uint = 1 << 16;
|
||||||
pub const no_monomorphic_collapse: uint = 1 << 17;
|
pub const no_monomorphic_collapse: uint = 1 << 17;
|
||||||
|
const gc: uint = 1 << 18;
|
||||||
|
const jit: uint = 1 << 19;
|
||||||
|
const debug_info: uint = 1 << 20;
|
||||||
|
const extra_debug_info: uint = 1 << 21;
|
||||||
|
const static: uint = 1 << 22;
|
||||||
|
|
||||||
pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
|
pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
|
||||||
~[(~"verbose", ~"in general, enable more debug printouts", verbose),
|
~[(~"verbose", ~"in general, enable more debug printouts", verbose),
|
||||||
@ -102,6 +107,13 @@ pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
|
|||||||
(~"no-opt", ~"do not optimize, even if -O is passed", no_opt),
|
(~"no-opt", ~"do not optimize, even if -O is passed", no_opt),
|
||||||
(~"no-monomorphic-collapse", ~"do not collapse template instantiations",
|
(~"no-monomorphic-collapse", ~"do not collapse template instantiations",
|
||||||
no_monomorphic_collapse),
|
no_monomorphic_collapse),
|
||||||
|
(~"gc", ~"Garbage collect shared data (experimental)", gc),
|
||||||
|
(~"jit", ~"Execute using JIT (experimental)", jit),
|
||||||
|
(~"extra-debug-info", ~"Extra debugging info (experimental)",
|
||||||
|
extra_debug_info),
|
||||||
|
(~"debug-info", ~"Produce debug info (experimental)", debug_info),
|
||||||
|
(~"static", ~"Use or produce static libraries or binaries " +
|
||||||
|
"(experimental)", static)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user