Support cc_library as LLNDK without llndk_library

Allow cc_library modules to configure themselves as an LLNDK library
using llndk.symbol_file instead of llndk_stubs pointing to an
llndk_library module.

Bug: 170784825
Test: TestEmbeddedLlndkLibrary
Change-Id: Id884cdada7094bbea6809a98e687e039778c5dc6
This commit is contained in:
Colin Cross
2021-03-02 11:00:07 -08:00
parent c82e6e2e8f
commit 0fb7fcd3a6
5 changed files with 128 additions and 13 deletions

View File

@@ -1145,12 +1145,7 @@ func (m *Module) HasLlndkStubs() bool {
func (c *Module) isImplementationForLLNDKPublic() bool {
library, _ := c.library.(*libraryDecorator)
return library != nil && library.hasLLNDKStubs() &&
(!Bool(library.Properties.Llndk.Private) ||
// TODO(b/170784825): until the LLNDK properties are moved into the cc_library,
// the non-Vendor variants of the cc_library don't know if the corresponding
// llndk_library set private: true. Since libft2 is the only private LLNDK
// library, hardcode it during the transition.
c.BaseModuleName() != "libft2")
!Bool(library.Properties.Llndk.Private)
}
// Returns true for LLNDK-private, VNDK-SP-private, and VNDK-core-private.