Skip DepsMutator on disabled modules

Dependencies of disabled modules may not have the right variations
for calling AddVariationDependencies, skip DepsMutator completely
on disabled modules.

Bug: 112707915
Test: m checkbuild
Test: prebuilts/build-tools/build-prebuilts.sh
Change-Id: I702e591437e5e6eb9f91f3b7eb32bacc4bd5d249
This commit is contained in:
Colin Cross 2018-08-30 12:52:41 -07:00
parent 42d48b7b8b
commit 6db4a6a7d9
2 changed files with 1 additions and 5 deletions

View File

@ -205,7 +205,7 @@ func (mutator *mutator) Parallel() MutatorHandle {
} }
func depsMutator(ctx BottomUpMutatorContext) { func depsMutator(ctx BottomUpMutatorContext) {
if m, ok := ctx.Module().(Module); ok { if m, ok := ctx.Module().(Module); ok && m.Enabled() {
m.DepsMutator(ctx) m.DepsMutator(ctx)
} }
} }

View File

@ -922,10 +922,6 @@ func (c *Module) beginMutator(actx android.BottomUpMutatorContext) {
} }
func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) { func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
if !c.Enabled() {
return
}
ctx := &depsContext{ ctx := &depsContext{
BottomUpMutatorContext: actx, BottomUpMutatorContext: actx,
moduleContextImpl: moduleContextImpl{ moduleContextImpl: moduleContextImpl{