From 47e1a7585145fe65b51afaf8722f585e720e69d4 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Sat, 16 Oct 2021 18:36:13 -0700 Subject: [PATCH] Fix mac/allowmissingdeps builds This WalkDeps loop was expecting the dependencies to be fully filled out, which isn't necessarily true on AllowMissingDependencies builds, especially on Mac when the modules may exist, but not be enabled. This was triggered when make_erofs was added to an apex, but wasn't enabled on Mac. It shouldn't be a problem to skip the disabled dependencies, since we'll have already marked the current module as missing dependencies, which means it won't actually get built. Test: `m nothing` on a mac Change-Id: Icd6d597117be4cde5bff041be3fd47361c54cad9 --- apex/apex.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apex/apex.go b/apex/apex.go index 9c2c679a0..0bca09394 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1151,8 +1151,8 @@ const ( zipApexType = "zip" flattenedApexType = "flattened" - ext4FsType = "ext4" - f2fsFsType = "f2fs" + ext4FsType = "ext4" + f2fsFsType = "f2fs" erofsFsType = "erofs" ) @@ -1683,6 +1683,9 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { if _, ok := depTag.(android.ExcludeFromApexContentsTag); ok { return false } + if mod, ok := child.(android.Module); ok && !mod.Enabled() { + return false + } depName := ctx.OtherModuleName(child) if _, isDirectDep := parent.(*apexBundle); isDirectDep { switch depTag {