Merge "Add apex stub lib to LOCAL_SHARED_LIBRARIES" am: 6cf8ff918a

am: f2dd11f316

Change-Id: Ic1a9d8d2406eb51d36f7af5aa8c0e695bb8c00f1
This commit is contained in:
Logan Chien
2019-01-18 20:06:46 -08:00
committed by android-build-merger

View File

@@ -1652,17 +1652,14 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
// Export the shared libs to Make. // Export the shared libs to Make.
switch depTag { switch depTag {
case sharedDepTag, sharedExportDepTag, lateSharedDepTag: case sharedDepTag, sharedExportDepTag, lateSharedDepTag:
// Dependency to the stubs lib which is already included in an APEX
// is not added to the androidmk dependency
if dependentLibrary, ok := ccDep.linker.(*libraryDecorator); ok { if dependentLibrary, ok := ccDep.linker.(*libraryDecorator); ok {
if dependentLibrary.buildStubs() && android.InAnyApex(depName) { if dependentLibrary.buildStubs() && android.InAnyApex(depName) {
// Also add the dependency to the APEX(es) providing the library so that // Add the dependency to the APEX(es) providing the library so that
// m <module> can trigger building the APEXes as well. // m <module> can trigger building the APEXes as well.
for _, an := range android.GetApexesForModule(depName) { for _, an := range android.GetApexesForModule(depName) {
c.Properties.ApexesProvidingSharedLibs = append( c.Properties.ApexesProvidingSharedLibs = append(
c.Properties.ApexesProvidingSharedLibs, an) c.Properties.ApexesProvidingSharedLibs, an)
} }
break
} }
} }