Add support for no-vendor-variant VNDK
When no-vendor-variant VNDK is enabled, the vendor variant of VNDK
libraries are not installed. Since not all VNDK libraries will be
ready for this, we keep a list of library names in cc/vndk.go to
indicate which libraries must have their vendor variants always
installed regardless of whether no-vendor-variant VNDK is enabled.
Also add --remove-build-id option to the strip script to facilitate
the check of functional identity of the two variants.
Bug: 119423884
Test: Add a dummy VNDK library and build with
TARGET_VNDK_USE_CORE_VARIANT := true, with the corresponding
build/make change.
Change-Id: Ieb1589488690e1cef1e310669a8b47a8b8759dac
diff --git a/cc/library.go b/cc/library.go
index 7216832..e5bb347 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -293,6 +293,10 @@
post_install_cmds []string
+ // If useCoreVariant is true, the vendor variant of a VNDK library is
+ // not installed.
+ useCoreVariant bool
+
// Decorated interafaces
*baseCompiler
*baseLinker
@@ -914,6 +918,9 @@
if ctx.isVndkSp() {
library.baseInstaller.subDir = "vndk-sp"
} else if ctx.isVndk() {
+ if ctx.DeviceConfig().VndkUseCoreVariant() && !ctx.mustUseVendorVariant() {
+ library.useCoreVariant = true
+ }
library.baseInstaller.subDir = "vndk"
}