linker: Enable PGO
linker-reloc-bench shows 1.2% improvement on flame.
PGO No PGO
BM_linker_relocation/
real_time_mean 52215 us 52916 us
Test: linker-reloc-bench --benchmark_repetitions=25
Bug: 175205560
Change-Id: I6abbbd51912f86fcf8112c024d1cf2519056bea7
diff --git a/linker/Android.bp b/linker/Android.bp
index 8a2809a..3ebae59 100644
--- a/linker/Android.bp
+++ b/linker/Android.bp
@@ -357,12 +357,35 @@
static_libs: [
"liblinker_debuggerd_stub",
],
- }
+ },
+ android_arm64: {
+ pgo: {
+ profile_file: "bionic/linker_arm_arm64.profdata",
+ },
+ },
+ android_arm: {
+ pgo: {
+ profile_file: "bionic/linker_arm_arm64.profdata",
+ },
+ },
+ android_x86_64: {
+ pgo: {
+ profile_file: "bionic/linker_x86_x86_64.profdata",
+ },
+ },
+ android_x86: {
+ pgo: {
+ profile_file: "bionic/linker_x86_x86_64.profdata",
+ },
+ },
},
lto: {
never: true,
},
+ pgo: {
+ sampling: true,
+ },
}
// ========================================================