diff --git a/cc/afdo.go b/cc/afdo.go index bc7cd5212..23d196dba 100644 --- a/cc/afdo.go +++ b/cc/afdo.go @@ -131,6 +131,10 @@ func (c *Module) fdoProfileMutator(ctx android.BottomUpMutatorContext) { return } + if !c.afdo.afdoEnabled() { + return + } + ctx.VisitDirectDepsWithTag(FdoProfileTag, func(m android.Module) { if ctx.OtherModuleHasProvider(m, FdoProfileProvider) { info := ctx.OtherModuleProvider(m, FdoProfileProvider).(FdoProfileInfo)