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
This commit is contained in:
parent
844de9d480
commit
97974dfa04
5 changed files with 2 additions and 42 deletions
|
@ -1400,10 +1400,6 @@ func (c *config) PrebuiltHiddenApiDir(_ PathContext) string {
|
|||
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)
|
||||
}
|
||||
|
|
|
@ -487,8 +487,6 @@ type ProductVariables struct {
|
|||
|
||||
ReleaseDefaultModuleBuildFromSource *bool `json:",omitempty"`
|
||||
|
||||
KeepVndk *bool `json:",omitempty"`
|
||||
|
||||
CheckVendorSeappViolations *bool `json:",omitempty"`
|
||||
|
||||
BuildFlags map[string]string `json:",omitempty"`
|
||||
|
|
22
apex/apex.go
22
apex/apex.go
|
@ -953,7 +953,6 @@ func (a *apexBundle) ApexInfoMutator(mctx android.TopDownMutatorContext) {
|
|||
// 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 @@ func (a *apexBundle) ApexInfoMutator(mctx android.TopDownMutatorContext) {
|
|||
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 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext,
|
|||
// 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 rBcpPackages() map[string][]string {
|
|||
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)
|
||||
}
|
||||
|
|
10
cc/cc.go
10
cc/cc.go
|
@ -1623,14 +1623,6 @@ func (ctx *moduleContextImpl) useSdk() bool {
|
|||
|
||||
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 @@ func (ctx *moduleContextImpl) minSdkVersion() string {
|
|||
|
||||
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()
|
||||
|
|
|
@ -1761,12 +1761,6 @@ func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue