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
This commit is contained in:
Kiyoung Kim
2024-07-05 14:00:34 +09:00
parent ef2388e99f
commit e8d8a477df

View File

@@ -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())
}