diff --git a/android/mutator.go b/android/mutator.go index 64d9fddb7..b9c44e83a 100644 --- a/android/mutator.go +++ b/android/mutator.go @@ -205,7 +205,7 @@ func (mutator *mutator) Parallel() MutatorHandle { } func depsMutator(ctx BottomUpMutatorContext) { - if m, ok := ctx.Module().(Module); ok { + if m, ok := ctx.Module().(Module); ok && m.Enabled() { m.DepsMutator(ctx) } } diff --git a/cc/cc.go b/cc/cc.go index befd68331..44d5900f9 100644 --- a/cc/cc.go +++ b/cc/cc.go @@ -922,10 +922,6 @@ func (c *Module) beginMutator(actx android.BottomUpMutatorContext) { } func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) { - if !c.Enabled() { - return - } - ctx := &depsContext{ BottomUpMutatorContext: actx, moduleContextImpl: moduleContextImpl{