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/ndk_library.go b/cc/ndk_library.go
index f2ad652..02b38a6 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -100,10 +100,16 @@
unversionedUntil android.ApiLevel
}
+var _ versionedInterface = (*stubDecorator)(nil)
+
func shouldUseVersionScript(ctx BaseModuleContext, stub *stubDecorator) bool {
return stub.apiLevel.GreaterThanOrEqualTo(stub.unversionedUntil)
}
+func (stub *stubDecorator) implementationModuleName(name string) string {
+ return strings.TrimSuffix(name, ndkLibrarySuffix)
+}
+
func ndkLibraryVersions(ctx android.BaseMutatorContext, from android.ApiLevel) []string {
var versions []android.ApiLevel
versionStrs := []string{}