Add required, host_required, and target_required as dependencies

So far, the installation of required modules were handled by Make. This
prevents us from implementing the module installation and packaging
entirely in Soong.

This CL is the first step towards that goal. Soong now correctly tracks
the dependencies and they are correctly returned by
TransitivePackagingSpecs(), which is used by packaging modules like
android_system_image.

Bug: 321626681
Test: build
Change-Id: I9192b5333ceaa0b7d1c5c4abeec2af62febcd976
This commit is contained in:
Jiyong Park
2024-03-18 18:37:10 +09:00
parent 8fb0e9734c
commit 8bcf3c64f1
7 changed files with 119 additions and 1 deletions

View File

@@ -1821,6 +1821,9 @@ func (a *apexBundle) WalkPayloadDeps(ctx android.ModuleContext, do android.Paylo
if dt, ok := depTag.(*dependencyTag); ok && !dt.payload {
return false
}
if depTag == android.RequiredDepTag {
return false
}
ai, _ := android.OtherModuleProvider(ctx, child, android.ApexInfoProvider)
externalDep := !android.InList(ctx.ModuleName(), ai.InApexVariants)
@@ -2314,6 +2317,8 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext,
// nothing
} else if depTag == android.DarwinUniversalVariantTag {
// nothing
} else if depTag == android.RequiredDepTag {
// nothing
} else if am.CanHaveApexVariants() && am.IsInstallableToApex() {
ctx.ModuleErrorf("unexpected tag %s for indirect dependency %q", android.PrettyPrintTag(depTag), depName)
}