librustc_trans: Gate the preinliner with another -Z flag.

Signed-off-by: NEmilio Cobos Álvarez <emilio@crisal.io>
上级 688275a4
......@@ -1254,6 +1254,9 @@ fn parse_edition(slot: &mut Edition, v: Option<&str>) -> bool {
location if it's empty."),
pgo_use: String = (String::new(), parse_string, [TRACKED],
"Use PGO profile data from the given profile file."),
disable_instrumentation_preinliner: bool =
(false, parse_bool, [TRACKED], "Disable the instrumentation pre-inliner, \
useful for profiling / PGO."),
relro_level: Option<RelroLevel> = (None, parse_relro_level, [TRACKED],
"choose which RELRO level to use"),
nll: bool = (false, parse_bool, [UNTRACKED],
......
......@@ -61,7 +61,9 @@ unsafe fn configure_llvm(sess: &Session) {
add("rustc"); // fake program name
if sess.time_llvm_passes() { add("-time-passes"); }
if sess.print_llvm_passes() { add("-debug-pass=Structure"); }
add("-disable-preinline");
if sess.opts.debugging_opts.disable_instrumentation_preinliner {
add("-disable-preinline");
}
for arg in &sess.opts.cg.llvm_args {
add(&(*arg));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册