Add version to vendor variants
Vendor variant is now divided into several vendor.{version} variants,
depending on their intended usages:
vendor.{BOARD_VNDK_VERSION}: vendor and vendor_available modules
vendor.{PLATFORM_VNDK_VERSION}: VNDK modules in the source tree
vendor.{snapshot_ver}: VNDK snapshot modules
This also affects exported module names from Soong to Make. But to
maintain backward compatibility, ".{BOARD_VNDK_VERSION}" suffix will not
be emitted for modules having version BOARD_VNDK_VERSION, so that vendor
modules still can be referred as-is.
Bug: 65377115
Bug: 68123344
Test: clean build and boot blueline
Change-Id: Ib9016a0f1fe06b97e9423fd95142653a89a343fa
diff --git a/cc/androidmk.go b/cc/androidmk.go
index 66dd838..c9d4dad 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -37,6 +37,7 @@
Os() android.OsType
Host() bool
useVndk() bool
+ vndkVersion() string
static() bool
inRecovery() bool
}
@@ -109,17 +110,7 @@
}
c.subAndroidMk(&ret, c.installer)
- if c.Target().NativeBridge == android.NativeBridgeEnabled {
- ret.SubName += nativeBridgeSuffix
- }
-
- if c.useVndk() && c.hasVendorVariant() {
- // .vendor suffix is added only when we will have two variants: core and vendor.
- // The suffix is not added for vendor-only module.
- ret.SubName += vendorSuffix
- } else if c.inRecovery() && !c.onlyInRecovery() {
- ret.SubName += recoverySuffix
- }
+ ret.SubName += c.Properties.SubName
return ret
}
@@ -357,7 +348,6 @@
func (c *llndkStubDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
ret.Class = "SHARED_LIBRARIES"
- ret.SubName = vendorSuffix
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
c.libraryDecorator.androidMkWriteExportedFlags(w)