summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cc/config/global.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/cc/config/global.go b/cc/config/global.go
index b662ef03c..34e0aa7b1 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -140,6 +140,9 @@ var (
"-Werror=format-security",
"-nostdlibinc",
+ // Enable MLGO for register allocation.
+ "-mllvm -regalloc-enable-advisor=release",
+
// Emit additional debug info for AutoFDO
"-fdebug-info-for-profiling",
}
@@ -167,6 +170,8 @@ var (
"-Wl,--exclude-libs,libgcc_stripped.a",
"-Wl,--exclude-libs,libunwind_llvm.a",
"-Wl,--exclude-libs,libunwind.a",
+ // Enable MLGO for register allocation.
+ "-Wl,-mllvm,-regalloc-enable-advisor=release",
}
deviceGlobalLldflags = append(deviceGlobalLdflags, commonGlobalLldflags...)