Skip to content

Commit

Permalink
Unrolled build for rust-lang#134139
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#134139 - mustartt:pgo-linker-flag, r=saethlin

[AIX] keep profile-rt symbol alive

Clang passes `-u __llvm_profile_runtime` on AIX. https://reviews.llvm.org/D136192
We want to preserve the symbol in the case there are no instrumented object files.
  • Loading branch information
rust-timer authored Dec 11, 2024
2 parents 5a6036a + f4933ff commit a9d68e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_codegen_ssa/src/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,8 @@ impl<'a> Linker for AixLinker<'a> {

fn pgo_gen(&mut self) {
self.link_arg("-bdbg:namedsects:ss");
self.link_arg("-u");
self.link_arg("__llvm_profile_runtime");
}

fn control_flow_guard(&mut self) {}
Expand Down

0 comments on commit a9d68e2

Please sign in to comment.