Merge "Do not propagate dynamic dependencies for stub libs."

This commit is contained in:
Treehugger Robot
2020-04-28 12:10:26 +00:00
committed by Gerrit Code Review
2 changed files with 9 additions and 1 deletions

View File

@@ -375,7 +375,10 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte
specifiedDeps := specifiedDeps{}
specifiedDeps = ccModule.linker.linkerSpecifiedDeps(specifiedDeps)
if !ccModule.HasStubsVariants() {
// Propagate dynamic dependencies for implementation libs, but not stubs.
p.SharedLibs = specifiedDeps.sharedLibs
}
p.SystemSharedLibs = specifiedDeps.systemSharedLibs
}
p.exportedGeneratedHeaders = ccModule.ExportedGeneratedHeaders()

View File

@@ -1748,8 +1748,13 @@ func TestStubsLibrary(t *testing.T) {
native_shared_libs: ["stubslib"],
}
cc_library {
name: "internaldep",
}
cc_library {
name: "stubslib",
shared_libs: ["internaldep"],
stubs: {
symbol_file: "some/where/stubslib.map.txt",
versions: ["1", "2", "3"],