Do not propagate dynamic dependencies for stub libs.
Test: m nothing Test: Build an SDK snapshot including libc, check that the generated cc_prebuilt_library_shared for it is a stub that doesn't depend on ld-android. Bug: 152255951 Bug: 154310674 Change-Id: Ie5ec02aebdf00b75756a6eda40db821488d30065
This commit is contained in:
@@ -375,7 +375,10 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte
|
|||||||
specifiedDeps := specifiedDeps{}
|
specifiedDeps := specifiedDeps{}
|
||||||
specifiedDeps = ccModule.linker.linkerSpecifiedDeps(specifiedDeps)
|
specifiedDeps = ccModule.linker.linkerSpecifiedDeps(specifiedDeps)
|
||||||
|
|
||||||
p.SharedLibs = specifiedDeps.sharedLibs
|
if !ccModule.HasStubsVariants() {
|
||||||
|
// Propagate dynamic dependencies for implementation libs, but not stubs.
|
||||||
|
p.SharedLibs = specifiedDeps.sharedLibs
|
||||||
|
}
|
||||||
p.SystemSharedLibs = specifiedDeps.systemSharedLibs
|
p.SystemSharedLibs = specifiedDeps.systemSharedLibs
|
||||||
}
|
}
|
||||||
p.exportedGeneratedHeaders = ccModule.ExportedGeneratedHeaders()
|
p.exportedGeneratedHeaders = ccModule.ExportedGeneratedHeaders()
|
||||||
|
@@ -1748,8 +1748,13 @@ func TestStubsLibrary(t *testing.T) {
|
|||||||
native_shared_libs: ["stubslib"],
|
native_shared_libs: ["stubslib"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cc_library {
|
||||||
|
name: "internaldep",
|
||||||
|
}
|
||||||
|
|
||||||
cc_library {
|
cc_library {
|
||||||
name: "stubslib",
|
name: "stubslib",
|
||||||
|
shared_libs: ["internaldep"],
|
||||||
stubs: {
|
stubs: {
|
||||||
symbol_file: "some/where/stubslib.map.txt",
|
symbol_file: "some/where/stubslib.map.txt",
|
||||||
versions: ["1", "2", "3"],
|
versions: ["1", "2", "3"],
|
||||||
|
Reference in New Issue
Block a user