Mark LLNDK prebuilts as LLNDK

so that Vendor APEXes don't embed the LLNDK prebuilts (which are just
stubs of LLNDK libraries).

Bug: 280697209
Test: m nothing (soong test)
Change-Id: I9e6c123e73fa0ab56d8494a01652ee32a9b6a6cd
This commit is contained in:
Jooyung Han
2023-05-08 13:54:50 +09:00
parent 7ef8d46640
commit e3f0281b88
2 changed files with 174 additions and 1 deletions

View File

@@ -241,7 +241,7 @@ var (
func vndkModuleLister(predicate func(*Module) bool) moduleListerFunc {
return func(ctx android.SingletonContext) (moduleNames, fileNames []string) {
ctx.VisitAllModules(func(m android.Module) {
if c, ok := m.(*Module); ok && predicate(c) {
if c, ok := m.(*Module); ok && predicate(c) && !c.IsVndkPrebuiltLibrary() {
filename, err := getVndkFileName(c)
if err != nil {
ctx.ModuleErrorf(m, "%s", err)
@@ -402,6 +402,11 @@ func VndkMutator(mctx android.BottomUpMutatorContext) {
m.VendorProperties.IsVNDKPrivate = Bool(prebuiltLib.Properties.Llndk.Private)
}
if m.IsVndkPrebuiltLibrary() && !m.IsVndk() {
m.VendorProperties.IsLLNDK = true
// TODO(b/280697209): copy "llndk.private" flag to vndk_prebuilt_shared
}
if (isLib && lib.buildShared()) || (isPrebuiltLib && prebuiltLib.buildShared()) {
if m.vndkdep != nil && m.vndkdep.isVndk() && !m.vndkdep.isVndkExt() {
processVndkLibrary(mctx, m)