summaryrefslogtreecommitdiff
path: root/cc/afdo.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/afdo.go')
-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.