From e8d8a477df8ba74e528c1e59cb028b23964b27cf Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Fri, 5 Jul 2024 14:00:34 +0900 Subject: [PATCH] LLNDK libraries can also provide libraries Current linker.config.pb puts libraries into the provide library list only if the library is stub (or defines stub). However, there are some LLNDK libraries which does not define stub, thus would be ignored from the providing libs list. This change adds libraries into the providing libs list if the library is LLNDK. Bug: 351227576 Test: linker.config.pb from aosp_cf_system_x86_64 contains LLNDK libraries as providing libs Change-Id: I23c02c9d05a5176dab34fe792029d6236790be56 --- linkerconfig/linkerconfig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkerconfig/linkerconfig.go b/linkerconfig/linkerconfig.go index 3a8d3cfe3..87c081431 100644 --- a/linkerconfig/linkerconfig.go +++ b/linkerconfig/linkerconfig.go @@ -104,7 +104,7 @@ func BuildLinkerConfig(ctx android.ModuleContext, builder *android.RuleBuilder, // Secondly, if there's provideLibs gathered from provideModules, append them var provideLibs []string for _, m := range provideModules { - if c, ok := m.(*cc.Module); ok && cc.IsStubTarget(c) { + if c, ok := m.(*cc.Module); ok && (cc.IsStubTarget(c) || c.HasLlndkStubs()) { for _, ps := range c.PackagingSpecs() { provideLibs = append(provideLibs, ps.FileName()) }