1
Fork 0

librustc_trans: Gate the preinliner with another -Z flag.

Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2018-03-12 21:15:16 +01:00
parent 688275a400
commit e31addf7c3
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 6 additions and 1 deletions

View file

@ -1254,6 +1254,9 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
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],

View file

@ -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"); }
if sess.opts.debugging_opts.disable_instrumentation_preinliner {
add("-disable-preinline");
}
for arg in &sess.opts.cg.llvm_args {
add(&(*arg));