Skip to content

Commit

Permalink
Add profiling support to AIX
Browse files Browse the repository at this point in the history
AIX ld needs special option to merge objects with profiling. Also,
profiler_builtins should include builtins for AIX from compiler-rt.
  • Loading branch information
ecnelises committed Feb 28, 2024
1 parent ef32456 commit 9d71386
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/rustc_codegen_ssa/src/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,9 @@ impl<'a> Linker for AixLinker<'a> {

fn optimize(&mut self) {}

fn pgo_gen(&mut self) {}
fn pgo_gen(&mut self) {
self.cmd.arg("-bdbg:namedsects:ss");
}

fn control_flow_guard(&mut self) {}

Expand Down
1 change: 1 addition & 0 deletions library/profiler_builtins/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ fn main() {
"InstrProfilingMerge.c",
"InstrProfilingMergeFile.c",
"InstrProfilingNameVar.c",
"InstrProfilingPlatformAIX.c",
"InstrProfilingPlatformDarwin.c",
"InstrProfilingPlatformFuchsia.c",
"InstrProfilingPlatformLinux.c",
Expand Down

0 comments on commit 9d71386

Please sign in to comment.