aboutsummaryrefslogtreecommitdiff
path: root/apex
diff options
context:
space:
mode:
authorKiyoung Kim <kiyoungkim@google.com>2024-04-04 17:33:42 +0900
committerKiyoung Kim <kiyoungkim@google.com>2024-04-05 01:57:32 +0000
commit4e765b1bfc82703d9febf30b44d3f6cbcaa29523 (patch)
tree9fba04f488d58004516e098fafa49286b57a6cd0 /apex
parent37693d0a278f62f5a21aab1958440d86f3a78f0a (diff)
downloadsoong-4e765b1bfc82703d9febf30b44d3f6cbcaa29523.tar.gz
Remove Device VNDK version usage from Soong
As of VNDK deprecation, Device VNDK version should no longer be used from build. This change removes all references on Device VNDK version and related logic with it. Bug: 330100430 Test: AOSP CF build succeeded Change-Id: Ibc290f0b41e8321f80c75c69f810223989af68dc
Diffstat (limited to 'apex')
-rw-r--r--apex/apex.go28
-rw-r--r--apex/builder.go2
2 files changed, 11 insertions, 19 deletions
diff --git a/apex/apex.go b/apex/apex.go
index d437efe3c..1b998effd 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -737,33 +737,25 @@ func (a *apexBundle) combineProperties(ctx android.BottomUpMutatorContext) {
// 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) {
+func (a *apexBundle) getImageVariationPair() (string, string) {
if a.vndkApex {
return cc.VendorVariationPrefix, a.vndkVersion()
}
prefix := android.CoreVariation
- vndkVersion := ""
- if deviceConfig.VndkVersion() != "" {
- if a.SocSpecific() || a.DeviceSpecific() {
- prefix = cc.VendorVariationPrefix
- vndkVersion = deviceConfig.VndkVersion()
- }
- } else {
- if a.SocSpecific() || a.DeviceSpecific() {
- prefix = cc.VendorVariation
- } else if a.ProductSpecific() {
- prefix = cc.ProductVariation
- }
+ if a.SocSpecific() || a.DeviceSpecific() {
+ prefix = cc.VendorVariation
+ } else if a.ProductSpecific() {
+ prefix = cc.ProductVariation
}
- return prefix, vndkVersion
+ return prefix, ""
}
// getImageVariation returns the image variant name for this apexBundle. In most cases, it's simply
// android.CoreVariation, but gets complicated for the vendor APEXes and the VNDK APEX.
-func (a *apexBundle) getImageVariation(ctx android.BottomUpMutatorContext) string {
- prefix, vndkVersion := a.getImageVariationPair(ctx.DeviceConfig())
+func (a *apexBundle) getImageVariation() string {
+ prefix, vndkVersion := a.getImageVariationPair()
return prefix + vndkVersion
}
@@ -773,7 +765,7 @@ func (a *apexBundle) DepsMutator(ctx android.BottomUpMutatorContext) {
// each target os/architectures, appropriate dependencies are selected by their
// target.<os>.multilib.<type> groups and are added as (direct) dependencies.
targets := ctx.MultiTargets()
- imageVariation := a.getImageVariation(ctx)
+ imageVariation := a.getImageVariation()
a.combineProperties(ctx)
@@ -1534,7 +1526,7 @@ func (a *apexBundle) AddSanitizerDependencies(ctx android.BottomUpMutatorContext
// TODO(jiyong): move this info (the sanitizer name, the lib name, etc.) to cc/sanitize.go
// Keep only the mechanism here.
if sanitizerName == "hwaddress" && strings.HasPrefix(a.Name(), "com.android.runtime") {
- imageVariation := a.getImageVariation(ctx)
+ imageVariation := a.getImageVariation()
for _, target := range ctx.MultiTargets() {
if target.Arch.ArchType.Multilib == "lib64" {
addDependenciesForNativeModules(ctx, ApexNativeDependencies{
diff --git a/apex/builder.go b/apex/builder.go
index 9bd4b61da..763ce4d20 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -293,7 +293,7 @@ func (a *apexBundle) buildManifest(ctx android.ModuleContext, provideNativeLibs,
}
if android.InList(":vndk", requireNativeLibs) {
- if _, vndkVersion := a.getImageVariationPair(ctx.DeviceConfig()); vndkVersion != "" {
+ if _, vndkVersion := a.getImageVariationPair(); vndkVersion != "" {
optCommands = append(optCommands, "-v vndkVersion "+vndkVersion)
}
}