diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2024-12-11 03:30:42 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-11 03:30:42 -0500 |
| commit | 2891a92e902904e598128341728845c2ce293d6e (patch) | |
| tree | 19a5da215350608492409d74175e2bb31542ba54 | |
| parent | fe7fc768353e1ddde4525f12b8b31a5eb5f3946b (diff) | |
| parent | f4933ffbf1620df78a7ab12972ec3f0ce9dc08c8 (diff) | |
| download | rust-2891a92e902904e598128341728845c2ce293d6e.tar.gz rust-2891a92e902904e598128341728845c2ce293d6e.zip | |
Rollup merge of #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.
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/linker.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/linker.rs b/compiler/rustc_codegen_ssa/src/back/linker.rs index 05dfbd40a0a..4c5eb98e890 100644 --- a/compiler/rustc_codegen_ssa/src/back/linker.rs +++ b/compiler/rustc_codegen_ssa/src/back/linker.rs @@ -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) {} |
