rustc_metadata: Load the profiler runtime if we're generating PGO profile data.
This contains all the actual profiling code. Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
804f959507
commit
50a38725e1
1 changed files with 3 additions and 1 deletions
|
@ -784,7 +784,9 @@ impl<'a> CrateLoader<'a> {
|
|||
}
|
||||
|
||||
fn inject_profiler_runtime(&mut self) {
|
||||
if self.sess.opts.debugging_opts.profile {
|
||||
if self.sess.opts.debugging_opts.profile ||
|
||||
self.sess.opts.cg.pgo_gen.is_some()
|
||||
{
|
||||
info!("loading profiler");
|
||||
|
||||
let symbol = Symbol::intern("profiler_builtins");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue