Generate product variants by default
PRODUCT_PRODUCT_VNDK_VERSION is set to 'current' by default. Now, we can generate product variants without checking the PRODUCT_PRODUCT_VNDK_VERSION build variable. Remove reading the PRODUCT_PRODUCT_VNDK_VERSION variable from soong and generate product variants by default. Bug: 302255959 Test: m Change-Id: I9a9b2076f4367c5ce9a393bbb206f8dee3884bd8
This commit is contained in:
29
cc/image.go
29
cc/image.go
@@ -427,7 +427,6 @@ func MutateImage(mctx android.BaseModuleContext, m ImageMutatableModule) {
|
||||
|
||||
platformVndkVersion := mctx.DeviceConfig().PlatformVndkVersion()
|
||||
boardVndkVersion := mctx.DeviceConfig().VndkVersion()
|
||||
productVndkVersion := mctx.DeviceConfig().ProductVndkVersion()
|
||||
recoverySnapshotVersion := mctx.DeviceConfig().RecoverySnapshotVersion()
|
||||
usingRecoverySnapshot := recoverySnapshotVersion != "current" &&
|
||||
recoverySnapshotVersion != ""
|
||||
@@ -444,9 +443,6 @@ func MutateImage(mctx android.BaseModuleContext, m ImageMutatableModule) {
|
||||
if boardVndkVersion == "current" {
|
||||
boardVndkVersion = platformVndkVersion
|
||||
}
|
||||
if productVndkVersion == "current" {
|
||||
productVndkVersion = platformVndkVersion
|
||||
}
|
||||
|
||||
if m.NeedsLlndkVariants() {
|
||||
// This is an LLNDK library. The implementation of the library will be on /system,
|
||||
@@ -462,9 +458,6 @@ func MutateImage(mctx android.BaseModuleContext, m ImageMutatableModule) {
|
||||
if needVndkVersionVendorVariantForLlndk {
|
||||
vendorVariants = append(vendorVariants, boardVndkVersion)
|
||||
}
|
||||
if productVndkVersion != "" {
|
||||
productVariants = append(productVariants, productVndkVersion)
|
||||
}
|
||||
} else if m.NeedsVendorPublicLibraryVariants() {
|
||||
// A vendor public library has the implementation on /vendor, with stub variants
|
||||
// for system and product.
|
||||
@@ -473,9 +466,6 @@ func MutateImage(mctx android.BaseModuleContext, m ImageMutatableModule) {
|
||||
if platformVndkVersion != "" {
|
||||
productVariants = append(productVariants, platformVndkVersion)
|
||||
}
|
||||
if productVndkVersion != "" {
|
||||
productVariants = append(productVariants, productVndkVersion)
|
||||
}
|
||||
} else if boardVndkVersion == "" {
|
||||
// If the device isn't compiling against the VNDK, we always
|
||||
// use the core mode.
|
||||
@@ -507,10 +497,6 @@ func MutateImage(mctx android.BaseModuleContext, m ImageMutatableModule) {
|
||||
// product_available modules are available to /product.
|
||||
if m.HasProductVariant() {
|
||||
productVariants = append(productVariants, platformVndkVersion)
|
||||
// VNDK is always PLATFORM_VNDK_VERSION
|
||||
if !m.IsVndk() {
|
||||
productVariants = append(productVariants, productVndkVersion)
|
||||
}
|
||||
}
|
||||
} else if vendorSpecific && m.SdkVersion() == "" {
|
||||
// This will be available in /vendor (or /odm) only
|
||||
@@ -538,17 +524,10 @@ func MutateImage(mctx android.BaseModuleContext, m ImageMutatableModule) {
|
||||
coreVariantNeeded = true
|
||||
}
|
||||
|
||||
if boardVndkVersion != "" && productVndkVersion != "" {
|
||||
if coreVariantNeeded && productSpecific && m.SdkVersion() == "" {
|
||||
// The module has "product_specific: true" that does not create core variant.
|
||||
coreVariantNeeded = false
|
||||
productVariants = append(productVariants, productVndkVersion)
|
||||
}
|
||||
} else {
|
||||
// Unless PRODUCT_PRODUCT_VNDK_VERSION is set, product partition has no
|
||||
// restriction to use system libs.
|
||||
// No product variants defined in this case.
|
||||
productVariants = []string{}
|
||||
if coreVariantNeeded && productSpecific && m.SdkVersion() == "" {
|
||||
// The module has "product_specific: true" that does not create core variant.
|
||||
coreVariantNeeded = false
|
||||
productVariants = append(productVariants, platformVndkVersion)
|
||||
}
|
||||
|
||||
if m.RamdiskAvailable() {
|
||||
|
Reference in New Issue
Block a user