Do not perform AFDO or optimizing LTO for eng builds
Afdo creates more variants to build, and optimizing LTO is costly to
perform. Turn off these two optimizations for eng builds for a faster
build speed.
This reduces total C/C++ invocation time for aosp_arm64-eng by 6.28%.
Test: presubmit
Bug: 307753064
Change-Id: Ibac4269c66a64e896dba2074b607d71a2da37546
diff --git a/cc/cc.go b/cc/cc.go
index 867a59c..2e42761 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -2401,6 +2401,9 @@
if c.coverage != nil {
c.coverage.begin(ctx)
}
+ if c.afdo != nil {
+ c.afdo.begin(ctx)
+ }
if c.lto != nil {
c.lto.begin(ctx)
}