summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-07-02 18:00:57 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-07-02 18:00:57 +0000
commit66b451b8aece6312946ecff33908b19410f88095 (patch)
tree19be1e7e43cf2b49167bbcad0e2b5851c3e9260d
parentcd674738c0d86499cc917dc90a6874b5753ee2c9 (diff)
parentf88568922718d3ffba7057c47517d8061ece6553 (diff)
Merge "AFDO: Do not mutate on disabled modules" into main
-rw-r--r--cc/afdo.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cc/afdo.go b/cc/afdo.go
index 00b22456f..6921edfba 100644
--- a/cc/afdo.go
+++ b/cc/afdo.go
@@ -176,6 +176,9 @@ func (a *afdoTransitionMutator) IncomingTransition(ctx android.IncomingTransitio
func (a *afdoTransitionMutator) Mutate(ctx android.BottomUpMutatorContext, variation string) {
if m, ok := ctx.Module().(*Module); ok && m.afdo != nil {
+ if !m.Enabled(ctx) {
+ return
+ }
if variation == "" {
// The empty variation is either a module that has enabled AFDO for itself, or the non-AFDO
// variant of a dependency.