Generate image variation without version
Current CC/Rust Image variations are generated with target VNDK version. However, this is no longer valid if VNDK is deprecated. This change generates image variation without version ("vendor", "product") if VNDK is deprecated. Bug: 316829758 Test: m nothing --no-skip-soong-tests passed Test: aosp_cf_x86_64_phone build succeeded Change-Id: I2387ed8a2632bfd9462621f882a947695ae1653d
This commit is contained in:
17
apex/apex.go
17
apex/apex.go
@@ -719,7 +719,7 @@ func (a *apexBundle) combineProperties(ctx android.BottomUpMutatorContext) {
|
||||
|
||||
// getImageVariationPair returns a pair for the image variation name as its
|
||||
// prefix and suffix. The prefix indicates whether it's core/vendor/product and the
|
||||
// suffix indicates the vndk version when it's vendor or product.
|
||||
// suffix indicates the vndk version for vendor/product if vndk is enabled.
|
||||
// getImageVariation can simply join the result of this function to get the
|
||||
// image variation name.
|
||||
func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (string, string) {
|
||||
@@ -727,8 +727,8 @@ func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (s
|
||||
return cc.VendorVariationPrefix, a.vndkVersion(deviceConfig)
|
||||
}
|
||||
|
||||
var prefix string
|
||||
var vndkVersion string
|
||||
prefix := android.CoreVariation
|
||||
vndkVersion := ""
|
||||
if deviceConfig.VndkVersion() != "" {
|
||||
if a.SocSpecific() || a.DeviceSpecific() {
|
||||
prefix = cc.VendorVariationPrefix
|
||||
@@ -737,15 +737,18 @@ func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (s
|
||||
prefix = cc.ProductVariationPrefix
|
||||
vndkVersion = deviceConfig.PlatformVndkVersion()
|
||||
}
|
||||
} else {
|
||||
if a.SocSpecific() || a.DeviceSpecific() {
|
||||
prefix = cc.VendorVariation
|
||||
} else if a.ProductSpecific() {
|
||||
prefix = cc.ProductVariation
|
||||
}
|
||||
}
|
||||
if vndkVersion == "current" {
|
||||
vndkVersion = deviceConfig.PlatformVndkVersion()
|
||||
}
|
||||
if vndkVersion != "" {
|
||||
return prefix, vndkVersion
|
||||
}
|
||||
|
||||
return android.CoreVariation, "" // The usual case
|
||||
return prefix, vndkVersion
|
||||
}
|
||||
|
||||
// getImageVariation returns the image variant name for this apexBundle. In most cases, it's simply
|
||||
|
Reference in New Issue
Block a user