Copy shared_libs and system_shared_libs to module snapshot

This change ensures that the runtime dependencies between a
binary/shared library are correctly specified in the snapshot so that
the build can ensure that shared libraries are built before the targets
that use them.

It adds support for differentiating between references that are
required to refer to another sdk member (required) and those that may
refer to either an sdk member or a non-sdk member (optional). The
latter is used for shared library references as the libraries used by
an sdk member may be provided from outside the sdk. e.g. liblog is not
part of the ART module but is used by some members of the ART sdk.

Bug: 142935992
Test: m nothing
Change-Id: Ia8509ffe79b208c23beba1880fe9c8a92b732685
This commit is contained in:
Paul Duffin
2020-03-06 12:30:43 +00:00
parent b07fa51196
commit 13f0271478
10 changed files with 384 additions and 72 deletions

View File

@@ -255,5 +255,5 @@ func (mt *systemModulesSdkMemberType) BuildSnapshot(sdkModuleContext android.Mod
pbm := builder.AddPrebuiltModule(member, "java_system_modules_import")
// Add the references to the libraries that form the system module.
pbm.AddPropertyWithTag("libs", systemModule.properties.Libs, builder.SdkMemberReferencePropertyTag())
pbm.AddPropertyWithTag("libs", systemModule.properties.Libs, builder.SdkMemberReferencePropertyTag(true))
}