Fix apex_vndk with TARGET_VNDK_USE_CORE_VARIANT
When TARGET_VNDK_USE_CORE_VARIANT is set, vndk apex should have only - vndk sp libraries - vndk core libraries which are marked as "must use vendor variant" Previously, vndk sp libs are discarded when TARGET_VNDK_USE_CORE_VARIANT is set. Bug: 143374795 Bug: 139772411 Test: TARGET_VNDK_USE_CORE_VARIANT=true m com.android.vndk.current see if vndk sp lib(e.g. libunwindstakc) is included. Change-Id: Iae218fff5c354eb874839a1f71be30633fb8a9ab
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user