Merge "Remove versioned LLNDK stubs"
This commit is contained in:
@@ -1813,6 +1813,11 @@ func (library *libraryDecorator) stubsVersions(ctx android.BaseMutatorContext) [
|
||||
return nil
|
||||
}
|
||||
|
||||
if library.hasLLNDKStubs() && ctx.Module().(*Module).UseVndk() {
|
||||
// LLNDK libraries only need a single stubs variant.
|
||||
return []string{android.FutureApiLevel.String()}
|
||||
}
|
||||
|
||||
// Future API level is implicitly added if there isn't
|
||||
vers := library.Properties.Stubs.Versions
|
||||
if inList(android.FutureApiLevel.String(), vers) {
|
||||
@@ -2154,8 +2159,7 @@ func moduleLibraryInterface(module blueprint.Module) libraryInterface {
|
||||
return nil
|
||||
}
|
||||
|
||||
// versionSelector normalizes the versions in the Stubs.Versions property into MutatedProperties.AllStubsVersions,
|
||||
// and propagates the value from implementation libraries to llndk libraries with the same name.
|
||||
// versionSelector normalizes the versions in the Stubs.Versions property into MutatedProperties.AllStubsVersions.
|
||||
func versionSelectorMutator(mctx android.BottomUpMutatorContext) {
|
||||
if library := moduleLibraryInterface(mctx.Module()); library != nil && CanBeVersionVariant(mctx.Module().(*Module)) {
|
||||
if library.buildShared() {
|
||||
@@ -2169,15 +2173,6 @@ func versionSelectorMutator(mctx android.BottomUpMutatorContext) {
|
||||
// depend on the implementation library and haven't been mutated yet.
|
||||
library.setAllStubsVersions(versions)
|
||||
}
|
||||
|
||||
if mctx.Module().(*Module).UseVndk() && library.hasLLNDKStubs() {
|
||||
// Propagate the version to the llndk stubs module.
|
||||
mctx.VisitDirectDepsWithTag(llndkStubDepTag, func(stubs android.Module) {
|
||||
if stubsLib := moduleLibraryInterface(stubs); stubsLib != nil {
|
||||
stubsLib.setAllStubsVersions(library.allStubsVersions())
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user