VNDK is fully deprecated from Soong
VNDK is fully deprecated, so KeepVndk variable will have fixed value.
This change removes KeepVndk config value, and updates any logic using
the value as VNDK is always deprecated.
Bug: 330100430
Test: Soong tests passed
Ignore-AOSP-First: Resolve merge conflict
Change-Id: I98b7590c059883e06bf3fb236d88966de64991d7
Merged-In: I98b7590c059883e06bf3fb236d88966de64991d7
diff --git a/android/config.go b/android/config.go
index 5a6d40f..ae8195a 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1395,10 +1395,6 @@
return String(c.productVariables.PrebuiltHiddenApiDir)
}
-func (c *config) IsVndkDeprecated() bool {
- return !Bool(c.productVariables.KeepVndk)
-}
-
func (c *config) VendorApiLevel() string {
return String(c.productVariables.VendorApiLevel)
}
diff --git a/android/variable.go b/android/variable.go
index 9a95563..6e7c979 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -487,8 +487,6 @@
ReleaseDefaultModuleBuildFromSource *bool `json:",omitempty"`
- KeepVndk *bool `json:",omitempty"`
-
CheckVendorSeappViolations *bool `json:",omitempty"`
BuildFlags map[string]string `json:",omitempty"`
diff --git a/apex/apex.go b/apex/apex.go
index 5f711cd..37cb1c2 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -953,7 +953,6 @@
// the non-system APEXes because the VNDK libraries won't be included (and duped) in the
// APEX, but shared across APEXes via the VNDK APEX.
useVndk := a.SocSpecific() || a.DeviceSpecific() || (a.ProductSpecific() && mctx.Config().EnforceProductPartitionInterface())
- excludeVndkLibs := useVndk && a.useVndkAsStable(mctx)
if proptools.Bool(a.properties.Use_vndk_as_stable) {
if !useVndk {
mctx.PropertyErrorf("use_vndk_as_stable", "not supported for system/system_ext APEXes")
@@ -987,13 +986,8 @@
if !android.IsDepInSameApex(mctx, parent, child) {
return false
}
- if excludeVndkLibs {
- if c, ok := child.(*cc.Module); ok && c.IsVndk() {
- return false
- }
- }
- if useVndk && mctx.Config().IsVndkDeprecated() && child.Name() == "libbinder" {
+ if useVndk && child.Name() == "libbinder" {
mctx.ModuleErrorf("Module %s in the vendor APEX %s should not use libbinder. Use libbinder_ndk instead.", parent.Name(), a.Name())
}
@@ -2190,11 +2184,6 @@
// tags used below are private (e.g. `cc.sharedDepTag`).
if cc.IsSharedDepTag(depTag) || cc.IsRuntimeDepTag(depTag) {
if ch, ok := child.(*cc.Module); ok {
- if ch.UseVndk() && a.useVndkAsStable(ctx) && ch.IsVndk() {
- vctx.requireNativeLibs = append(vctx.requireNativeLibs, ":vndk")
- return false
- }
-
af := apexFileForNativeLibrary(ctx, ch, vctx.handleSpecialLibs)
af.transitiveDep = true
@@ -3015,12 +3004,3 @@
func (a *apexBundle) IsTestApex() bool {
return a.testApex
}
-
-func (a *apexBundle) useVndkAsStable(ctx android.BaseModuleContext) bool {
- // VNDK cannot be linked if it is deprecated
- if ctx.Config().IsVndkDeprecated() {
- return false
- }
-
- return proptools.Bool(a.properties.Use_vndk_as_stable)
-}
diff --git a/cc/cc.go b/cc/cc.go
index cb82f86..5e15381 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1623,14 +1623,6 @@
func (ctx *moduleContextImpl) sdkVersion() string {
if ctx.ctx.Device() {
- config := ctx.ctx.Config()
- if !config.IsVndkDeprecated() && ctx.useVndk() {
- vndkVer := ctx.mod.VndkVersion()
- if inList(vndkVer, config.PlatformVersionActiveCodenames()) {
- return "current"
- }
- return vndkVer
- }
return String(ctx.mod.Properties.Sdk_version)
}
return ""
@@ -1647,7 +1639,7 @@
if ctx.ctx.Device() {
config := ctx.ctx.Config()
- if config.IsVndkDeprecated() && ctx.inVendor() {
+ if ctx.inVendor() {
// If building for vendor with final API, then use the latest _stable_ API as "current".
if config.VendorApiLevelFrozen() && (ver == "" || ver == "current") {
ver = config.PlatformSdkVersion().String()
diff --git a/cc/library.go b/cc/library.go
index b9c1466..7a56834 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -1761,12 +1761,6 @@
library.baseInstaller.subDir = "vndk"
}
}
-
- // do not install vndk libs
- // vndk libs are packaged into VNDK APEX
- if ctx.isVndk() && !ctx.IsVndkExt() && !ctx.Config().IsVndkDeprecated() && !ctx.inProduct() {
- return
- }
} else if library.hasStubsVariants() && !ctx.Host() && ctx.directlyInAnyApex() {
// Bionic libraries (e.g. libc.so) is installed to the bootstrap subdirectory.
// The original path becomes a symlink to the corresponding file in the