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
diff --git a/apex/apex.go b/apex/apex.go
index 9c2c679..0bca093 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1151,8 +1151,8 @@
zipApexType = "zip"
flattenedApexType = "flattened"
- ext4FsType = "ext4"
- f2fsFsType = "f2fs"
+ ext4FsType = "ext4"
+ f2fsFsType = "f2fs"
erofsFsType = "erofs"
)
@@ -1683,6 +1683,9 @@
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 {