Emit LOCAL_CHECK_SAME_VNDK_VARIANTS
If a VNDK library does not require using different core and vendor variants, emit LOCAL_CHECK_SAME_VNDK_VARIANTS so that the two variants can be checked for identicalness. Bug: 145157349 Test: With the corresponding change in build/make, remove libbinder from build/soong/cc/config/vndk.go and check a build fails even without TARGET_VNDK_USE_CORE_VARIANT set. Change-Id: I7698edf9a24b0df150c0e4f7d8dd4926f053eee8
This commit is contained in:
@@ -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() {
|
||||||
|
@@ -386,6 +386,7 @@ 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,9 +1097,12 @@ 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.checkSameCoreVariant = true
|
||||||
|
if ctx.DeviceConfig().VndkUseCoreVariant() {
|
||||||
library.useCoreVariant = true
|
library.useCoreVariant = true
|
||||||
}
|
}
|
||||||
|
}
|
||||||
library.baseInstaller.subDir = "vndk"
|
library.baseInstaller.subDir = "vndk"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user