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/cc.go b/cc/cc.go
index dbe6346..be1ab8c 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1040,6 +1040,16 @@
return false
}
+// If this is a stubs library, ImplementationModuleName returns the name of the module that contains
+// the implementation. If it is an implementation library it returns its own name.
+func (c *Module) ImplementationModuleName(ctx android.BaseModuleContext) string {
+ name := ctx.OtherModuleName(c)
+ if versioned, ok := c.linker.(versionedInterface); ok {
+ name = versioned.implementationModuleName(name)
+ }
+ return name
+}
+
func (c *Module) bootstrap() bool {
return Bool(c.Properties.Bootstrap)
}