Move stubs related methods out of LinkableInterface
The stubs methods are very specific to cc for now, move them out of LinkableInterface so they are not shared with rust. Instead, create a cc.Module.library field that contains the libraryInterface to simplify calling libraryInterface methods on cc modules. Test: all Soong tests Test: no change to Soong outputs Change-Id: I0289d866ce1f7a765631fe3101a62b1b4988ba1c
This commit is contained in:
@@ -428,22 +428,22 @@ 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
|
||||
if lib := ccModule.library; lib != nil {
|
||||
if !lib.hasStubsVariants() {
|
||||
// Propagate dynamic dependencies for implementation libs, but not stubs.
|
||||
p.SharedLibs = specifiedDeps.sharedLibs
|
||||
} else {
|
||||
// TODO(b/169373910): 1. Only output the specific version (from
|
||||
// ccModule.StubsVersion()) if the module is versioned. 2. Ensure that all
|
||||
// the versioned stub libs are retained in the prebuilt tree; currently only
|
||||
// the stub corresponding to ccModule.StubsVersion() is.
|
||||
p.StubsVersions = lib.allStubsVersions()
|
||||
}
|
||||
}
|
||||
p.SystemSharedLibs = specifiedDeps.systemSharedLibs
|
||||
}
|
||||
p.exportedGeneratedHeaders = exportedInfo.GeneratedHeaders
|
||||
|
||||
if ccModule.HasStubsVariants() {
|
||||
// TODO(b/169373910): 1. Only output the specific version (from
|
||||
// ccModule.StubsVersion()) if the module is versioned. 2. Ensure that all
|
||||
// the versioned stub libs are retained in the prebuilt tree; currently only
|
||||
// the stub corresponding to ccModule.StubsVersion() is.
|
||||
p.StubsVersions = ccModule.AllStubsVersions()
|
||||
}
|
||||
|
||||
if !p.memberType.noOutputFiles && addOutputFile {
|
||||
p.outputFile = getRequiredMemberOutputFile(ctx, ccModule)
|
||||
}
|
||||
|
Reference in New Issue
Block a user