Skip to content

Commit 9d71386

Browse files
committed
Add profiling support to AIX
AIX ld needs special option to merge objects with profiling. Also, profiler_builtins should include builtins for AIX from compiler-rt.
1 parent ef32456 commit 9d71386

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler/rustc_codegen_ssa/src/back/linker.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,9 @@ impl<'a> Linker for AixLinker<'a> {
16311631

16321632
fn optimize(&mut self) {}
16331633

1634-
fn pgo_gen(&mut self) {}
1634+
fn pgo_gen(&mut self) {
1635+
self.cmd.arg("-bdbg:namedsects:ss");
1636+
}
16351637

16361638
fn control_flow_guard(&mut self) {}
16371639

library/profiler_builtins/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ fn main() {
2626
"InstrProfilingMerge.c",
2727
"InstrProfilingMergeFile.c",
2828
"InstrProfilingNameVar.c",
29+
"InstrProfilingPlatformAIX.c",
2930
"InstrProfilingPlatformDarwin.c",
3031
"InstrProfilingPlatformFuchsia.c",
3132
"InstrProfilingPlatformLinux.c",

0 commit comments

Comments
 (0)