Add llndk_stubs property
Prepare for making the relationship between an llndk_library stubs
module and the cc_library implementation module explicit by
adding an llndk_stubs property. Each cc_library will be updated
to point to its llndk_library, and the llndk_library name will
be changed to make the .llndk suffix explicit. Then the implicit
connection and suffix can be removed.
Bug: 170784825
Test: m checkbuild
Change-Id: I6b0482a3f286ec29b2e928551aa4317749f2b499
diff --git a/cc/vndk.go b/cc/vndk.go
index 981e039..aeaec03 100644
--- a/cc/vndk.go
+++ b/cc/vndk.go
@@ -247,7 +247,7 @@
}
func isLlndkLibrary(baseModuleName string, config android.Config) bool {
- _, ok := llndkLibraries(config)[baseModuleName]
+ _, ok := llndkLibraries(config)[strings.TrimSuffix(baseModuleName, llndkLibrarySuffix)]
return ok
}
@@ -290,8 +290,8 @@
func processLlndkLibrary(mctx android.BottomUpMutatorContext, m *Module) {
lib := m.linker.(*llndkStubDecorator)
- name := m.BaseModuleName()
- filename := m.BaseModuleName() + ".so"
+ name := m.ImplementationModuleName(mctx)
+ filename := name + ".so"
vndkLibrariesLock.Lock()
defer vndkLibrariesLock.Unlock()
@@ -834,8 +834,8 @@
if m, ok := module.(*Module); ok {
if llndk, ok := m.linker.(*llndkStubDecorator); ok {
// Skip bionic libs, they are handled in different manner
- name := m.BaseModuleName()
- if llndk.movedToApex && !isBionic(m.BaseModuleName()) {
+ name := llndk.implementationModuleName(m.BaseModuleName())
+ if llndk.movedToApex && !isBionic(name) {
movedToApexLlndkLibraries[name] = true
}
}