diff options
author | Kiyoung Kim <kiyoungkim@google.com> | 2024-03-18 16:01:19 +0900 |
---|---|---|
committer | Kiyoung Kim <kiyoungkim@google.com> | 2024-04-01 16:37:20 +0900 |
commit | fa13ff194c873c7dea108a9544bbc7b33436b104 (patch) | |
tree | 3b09d9da4cdc3b2fc37d07b1cff7f7c244fe6631 /apex | |
parent | 1db4a74a590e38f60f573fe23fa8ea137f6e2390 (diff) | |
download | soong-fa13ff194c873c7dea108a9544bbc7b33436b104.tar.gz |
Remove PlatformVndkVersion property
Platform VNDK version is no longer available based on VNDK deprecation.
Remove all code using Platform VNDK version.
Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: I7d0f7e23eff5d153346890f242a94b78bad6736b
Diffstat (limited to 'apex')
-rw-r--r-- | apex/apex.go | 8 | ||||
-rw-r--r-- | apex/builder.go | 4 | ||||
-rw-r--r-- | apex/vndk.go | 35 |
3 files changed, 10 insertions, 37 deletions
diff --git a/apex/apex.go b/apex/apex.go index bc91407a7..f24590f14 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -737,7 +737,7 @@ func (a *apexBundle) combineProperties(ctx android.BottomUpMutatorContext) { // image variation name. func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (string, string) { if a.vndkApex { - return cc.VendorVariationPrefix, a.vndkVersion(deviceConfig) + return cc.VendorVariationPrefix, a.vndkVersion() } prefix := android.CoreVariation @@ -746,9 +746,6 @@ func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (s if a.SocSpecific() || a.DeviceSpecific() { prefix = cc.VendorVariationPrefix vndkVersion = deviceConfig.VndkVersion() - } else if a.ProductSpecific() { - prefix = cc.ProductVariationPrefix - vndkVersion = deviceConfig.PlatformVndkVersion() } } else { if a.SocSpecific() || a.DeviceSpecific() { @@ -757,9 +754,6 @@ func (a *apexBundle) getImageVariationPair(deviceConfig android.DeviceConfig) (s prefix = cc.ProductVariation } } - if vndkVersion == "current" { - vndkVersion = deviceConfig.PlatformVndkVersion() - } return prefix, vndkVersion } diff --git a/apex/builder.go b/apex/builder.go index 50db631b7..9bd4b61da 100644 --- a/apex/builder.go +++ b/apex/builder.go @@ -277,7 +277,7 @@ func (a *apexBundle) buildManifest(ctx android.ModuleContext, provideNativeLibs, // VNDK APEX name is determined at runtime, so update "name" in apex_manifest optCommands := []string{} if a.vndkApex { - apexName := vndkApexNamePrefix + a.vndkVersion(ctx.DeviceConfig()) + apexName := vndkApexNamePrefix + a.vndkVersion() optCommands = append(optCommands, "-v name "+apexName) } @@ -1043,7 +1043,7 @@ func (a *apexBundle) getOverrideManifestPackageName(ctx android.ModuleContext) s if a.vndkApex { overrideName, overridden := ctx.DeviceConfig().OverrideManifestPackageNameFor(vndkApexName) if overridden { - return overrideName + ".v" + a.vndkVersion(ctx.DeviceConfig()) + return overrideName + ".v" + a.vndkVersion() } return "" } diff --git a/apex/vndk.go b/apex/vndk.go index 377c1c014..781aa3cbf 100644 --- a/apex/vndk.go +++ b/apex/vndk.go @@ -45,16 +45,12 @@ func vndkApexBundleFactory() android.Module { return bundle } -func (a *apexBundle) vndkVersion(config android.DeviceConfig) string { - vndkVersion := proptools.StringDefault(a.vndkProperties.Vndk_version, "current") - if vndkVersion == "current" { - vndkVersion = config.PlatformVndkVersion() - } - return vndkVersion +func (a *apexBundle) vndkVersion() string { + return proptools.StringDefault(a.vndkProperties.Vndk_version, "current") } type apexVndkProperties struct { - // Indicates VNDK version of which this VNDK APEX bundles VNDK libs. Default is Platform VNDK Version. + // Indicates VNDK version of which this VNDK APEX bundles VNDK libs. Vndk_version *string } @@ -64,7 +60,7 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { mctx.PropertyErrorf("native_bridge_supported", "%q doesn't support native bridge binary.", mctx.ModuleType()) } - vndkVersion := ab.vndkVersion(mctx.DeviceConfig()) + vndkVersion := ab.vndkVersion() if vndkVersion != "" { apiLevel, err := android.ApiLevelFromUser(mctx, vndkVersion) if err != nil { @@ -73,17 +69,9 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { } targets := mctx.MultiTargets() - if len(targets) > 0 && apiLevel.LessThan(cc.MinApiForArch(mctx, targets[0].Arch.ArchType)) && - vndkVersion != mctx.DeviceConfig().PlatformVndkVersion() { + if len(targets) > 0 && apiLevel.LessThan(cc.MinApiForArch(mctx, targets[0].Arch.ArchType)) { // Disable VNDK APEXes for VNDK versions less than the minimum supported API - // level for the primary architecture. This validation is skipped if the VNDK - // version matches the platform VNDK version, which can occur when the device - // config targets the 'current' VNDK (see `vndkVersion`). - ab.Disable() - } - if proptools.String(ab.vndkProperties.Vndk_version) != "" && - mctx.DeviceConfig().PlatformVndkVersion() != "" && - apiLevel.GreaterThanOrEqualTo(android.ApiLevelOrPanic(mctx, mctx.DeviceConfig().PlatformVndkVersion())) { + // level for the primary architecture. ab.Disable() } } @@ -93,20 +81,11 @@ func apexVndkMutator(mctx android.TopDownMutatorContext) { func apexVndkDepsMutator(mctx android.BottomUpMutatorContext) { if m, ok := mctx.Module().(*cc.Module); ok && cc.IsForVndkApex(mctx, m) { vndkVersion := m.VndkVersion() - // For VNDK-Lite device, we gather core-variants of VNDK-Sp libraries, which doesn't have VNDK version defined - if vndkVersion == "" { - vndkVersion = mctx.DeviceConfig().PlatformVndkVersion() - } if vndkVersion == "" { return } - - if vndkVersion == mctx.DeviceConfig().PlatformVndkVersion() { - vndkVersion = "current" - } else { - vndkVersion = "v" + vndkVersion - } + vndkVersion = "v" + vndkVersion vndkApexName := "com.android.vndk." + vndkVersion |