Don't install system image copies of libraries in unbundled apex builds

Apex builds are setting LOCAL_REQUIRED_MODULES to include external
dependencies into the system image.  This make sense for device builds,
but just causes extra unnecessary builds for unbundled apex builds
that are not building device images.  Skip the dependency during
unbundled builds.

Test: aosp-master-art mainline_modules_x86_64-userdebug builds
Change-Id: I363995b7309cc3c90b0a584d051050f105b5b915
This commit is contained in:
Colin Cross
2023-01-26 15:39:15 -08:00
parent 6cf5e0d9cb
commit df2043e96a

View File

@@ -2340,7 +2340,10 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext,
//
// Always include if we are a host-apex however since those won't have any
// system libraries.
if ch.IsStubsImplementationRequired() && !am.DirectlyInAnyApex() {
//
// Skip the dependency in unbundled builds where the device image is not
// being built.
if ch.IsStubsImplementationRequired() && !am.DirectlyInAnyApex() && !ctx.Config().UnbundledBuild() {
// we need a module name for Make
name := ch.ImplementationModuleNameForMake(ctx) + ch.Properties.SubName
if !android.InList(name, a.requiredDeps) {