Add an option to inhibit automatic injection of profiler_builtins
This commit is contained in:
parent
7fe41279c5
commit
9f23b2d36b
@ -686,7 +686,9 @@ impl<'a> CrateLoader<'a> {
|
||||
}
|
||||
|
||||
fn inject_profiler_runtime(&mut self) {
|
||||
if self.sess.opts.debugging_opts.profile || self.sess.opts.cg.profile_generate.enabled() {
|
||||
if (self.sess.opts.debugging_opts.profile || self.sess.opts.cg.profile_generate.enabled())
|
||||
&& !self.sess.opts.debugging_opts.no_profiler_runtime
|
||||
{
|
||||
info!("loading profiler");
|
||||
|
||||
let name = Symbol::intern("profiler_builtins");
|
||||
|
@ -890,6 +890,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
|
||||
"extra arguments to prepend to the linker invocation (space separated)"),
|
||||
profile: bool = (false, parse_bool, [TRACKED],
|
||||
"insert profiling code"),
|
||||
no_profiler_runtime: bool = (false, parse_bool, [TRACKED],
|
||||
"don't automatically inject the profiler_builtins crate"),
|
||||
relro_level: Option<RelroLevel> = (None, parse_relro_level, [TRACKED],
|
||||
"choose which RELRO level to use"),
|
||||
nll_facts: bool = (false, parse_bool, [UNTRACKED],
|
||||
|
Loading…
Reference in New Issue
Block a user