Do not consider disabled prebuilt variants.

Test: m nothing
Test: `m` with prebuilt SDKs in the manifest
Bug: 151303681
Change-Id: I44d3a3cc4d7c1e02cc0ec61827646801f804b168
This commit is contained in:
Martin Stjernholm
2020-07-07 02:20:40 +01:00
parent ed62b9cc2a
commit 235e2fdbd3
2 changed files with 113 additions and 24 deletions

View File

@@ -225,7 +225,7 @@ func PrebuiltRenameMutator(ctx BottomUpMutatorContext) {
// PrebuiltSourceDepsMutator adds dependencies to the prebuilt module from the
// corresponding source module, if one exists for the same variant.
func PrebuiltSourceDepsMutator(ctx BottomUpMutatorContext) {
if m, ok := ctx.Module().(PrebuiltInterface); ok && m.Prebuilt() != nil {
if m, ok := ctx.Module().(PrebuiltInterface); ok && m.Enabled() && m.Prebuilt() != nil {
p := m.Prebuilt()
if !p.properties.PrebuiltRenamedToSource {
name := m.base().BaseModuleName()