Merge changes from topic "vndkvariantcheck"

* changes:
  vndkMustUseVendorVariant += libstagefright_bufferpool@2.0
  Emit LOCAL_CHECK_SAME_VNDK_VARIANTS
This commit is contained in:
Treehugger Robot
2020-01-17 18:45:43 +00:00
committed by Gerrit Code Review
3 changed files with 11 additions and 3 deletions

View File

@@ -217,6 +217,9 @@ func (library *libraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.An
fmt.Fprintln(w, "LOCAL_NO_NOTICE_FILE := true") fmt.Fprintln(w, "LOCAL_NO_NOTICE_FILE := true")
fmt.Fprintln(w, "LOCAL_VNDK_DEPEND_ON_CORE_VARIANT := true") fmt.Fprintln(w, "LOCAL_VNDK_DEPEND_ON_CORE_VARIANT := true")
} }
if library.checkSameCoreVariant {
fmt.Fprintln(w, "LOCAL_CHECK_SAME_VNDK_VARIANTS := true")
}
}) })
if library.shared() && !library.buildStubs() { if library.shared() && !library.buildStubs() {

View File

@@ -132,6 +132,7 @@ var VndkMustUseVendorVariantList = []string{
"libsqlite", "libsqlite",
"libssl", "libssl",
"libstagefright_amrnb_common", "libstagefright_amrnb_common",
"libstagefright_bufferpool@2.0",
"libstagefright_bufferqueue_helper", "libstagefright_bufferqueue_helper",
"libstagefright_enc_common", "libstagefright_enc_common",
"libstagefright_flacdec", "libstagefright_flacdec",

View File

@@ -385,7 +385,8 @@ type libraryDecorator struct {
// If useCoreVariant is true, the vendor variant of a VNDK library is // If useCoreVariant is true, the vendor variant of a VNDK library is
// not installed. // not installed.
useCoreVariant bool useCoreVariant bool
checkSameCoreVariant bool
// Decorated interafaces // Decorated interafaces
*baseCompiler *baseCompiler
@@ -1096,8 +1097,11 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
if ctx.isVndkSp() { if ctx.isVndkSp() {
library.baseInstaller.subDir = "vndk-sp" library.baseInstaller.subDir = "vndk-sp"
} else if ctx.isVndk() { } else if ctx.isVndk() {
if ctx.DeviceConfig().VndkUseCoreVariant() && !ctx.mustUseVendorVariant() { if !ctx.mustUseVendorVariant() {
library.useCoreVariant = true library.checkSameCoreVariant = true
if ctx.DeviceConfig().VndkUseCoreVariant() {
library.useCoreVariant = true
}
} }
library.baseInstaller.subDir = "vndk" library.baseInstaller.subDir = "vndk"
} }