Soong works with empty VNDK version

This change is to fix more misc issues to enable Soong without VNDK
version. This change contains

* Update properties in generated Android.mk
* Update VNDK APEX build to work without VNDK version

Bug: 316829758
Test: AOSP Cuttlefish build succeeded
Change-Id: I10f3c798299afe2d539ec3426b8e2b6068a158f6
This commit is contained in:
Kiyoung Kim
2024-01-11 16:03:13 +09:00
parent 1c4cc3d40e
commit 8487c0b876
4 changed files with 39 additions and 24 deletions

View File

@@ -17,6 +17,7 @@ package cc
import (
"fmt"
"io"
"log"
"path/filepath"
"regexp"
"strconv"
@@ -871,12 +872,18 @@ func (library *libraryDecorator) getLibNameHelper(baseModuleName string, inVendo
func (library *libraryDecorator) getLibName(ctx BaseModuleContext) string {
name := library.getLibNameHelper(ctx.baseModuleName(), ctx.inVendor(), ctx.inProduct())
// Replace name with VNDK ext as original lib only when VNDK is enabled
if ctx.IsVndkExt() {
// vndk-ext lib should have the same name with original lib
ctx.VisitDirectDepsWithTag(vndkExtDepTag, func(module android.Module) {
originalName := module.(*Module).outputFile.Path()
name = strings.TrimSuffix(originalName.Base(), originalName.Ext())
})
if ctx.DeviceConfig().VndkVersion() != "" {
// vndk-ext lib should have the same name with original lib
ctx.VisitDirectDepsWithTag(vndkExtDepTag, func(module android.Module) {
originalName := module.(*Module).outputFile.Path()
name = strings.TrimSuffix(originalName.Base(), originalName.Ext())
})
} else {
// TODO(b/320208784) : Suggest a solution for former VNDK-ext libraries before VNDK deprecation.
log.Printf("VNDK Extension on module %s will not be available once VNDK is deprecated", ctx.baseModuleName())
}
}
if ctx.Host() && Bool(library.Properties.Unique_host_soname) {