Merge changes from topic "fix-vndk-core-variant"

am: 61eb8aaea4

Change-Id: If9b5bc238965c0adf4df9b51932025076bb37396
This commit is contained in:
Jooyung Han 2019-10-29 21:37:29 -07:00 committed by android-build-merger
commit d178df9c20
3 changed files with 11 additions and 3 deletions

View File

@ -1176,7 +1176,7 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
ctx.PropertyErrorf("apps", "%q is not an android_app module", depName)
}
}
} else {
} else if !a.vndkApex {
// indirect dependencies
if am, ok := child.(android.ApexModule); ok {
// We cannot use a switch statement on `depTag` here as the checked

View File

@ -93,6 +93,11 @@ func (c *Module) AndroidMk() android.AndroidMkData {
fmt.Fprintln(w, "LOCAL_USE_VNDK := true")
if c.IsVndk() && !c.static() {
fmt.Fprintln(w, "LOCAL_SOONG_VNDK_VERSION := "+c.vndkVersion())
// VNDK libraries available to vendor are not installed because
// they are packaged in VNDK APEX and installed by APEX packages (apex/apex.go)
if !c.isVndkExt() {
fmt.Fprintln(w, "LOCAL_UNINSTALLABLE_MODULE := true")
}
}
}
},

View File

@ -337,6 +337,10 @@ func IsForVndkApex(mctx android.BottomUpMutatorContext, m *Module) bool {
return false
}
if !mctx.Device() {
return false
}
if m.Target().NativeBridge == android.NativeBridgeEnabled {
return false
}
@ -350,8 +354,7 @@ func IsForVndkApex(mctx android.BottomUpMutatorContext, m *Module) bool {
if lib, ok := m.linker.(libraryInterface); ok {
useCoreVariant := m.vndkVersion() == mctx.DeviceConfig().PlatformVndkVersion() &&
mctx.DeviceConfig().VndkUseCoreVariant() &&
!inList(m.BaseModuleName(), config.VndkMustUseVendorVariantList)
mctx.DeviceConfig().VndkUseCoreVariant() && !m.MustUseVendorVariant()
return lib.shared() && m.UseVndk() && m.IsVndk() && !m.isVndkExt() && !useCoreVariant
}
return false