summaryrefslogtreecommitdiff
path: root/cc/pgo.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/pgo.go')
-rw-r--r--cc/pgo.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/pgo.go b/cc/pgo.go
index 8eb340053..d5c4b87dd 100644
--- a/cc/pgo.go
+++ b/cc/pgo.go
@@ -256,6 +256,12 @@ func (pgo *pgo) begin(ctx BaseModuleContext) {
}
}
+ // PGO profile use is not feasible for a Clang coverage build because
+ // -fprofile-use and -fprofile-instr-generate are incompatible.
+ if ctx.DeviceConfig().ClangCoverageEnabled() {
+ return
+ }
+
if !ctx.Config().IsEnvTrue("ANDROID_PGO_NO_PROFILE_USE") &&
proptools.BoolDefault(pgo.Properties.Pgo.Enable_profile_use, true) {
if profileFile := pgo.Properties.getPgoProfileFile(ctx); profileFile.Valid() {