Add support for cc_library_headers to replace llndk_headers
Set llndk.llndk_headers: true to allow a cc_library_headers
module to be used by a cc_library module with llndk.symbol_file set.
Bug: 170784825
Test: TestLlndkHeaders
Change-Id: Ib65a4b70717dc9a54ae30f2991485bb1bb9b8409
diff --git a/cc/cc.go b/cc/cc.go
index 260fcf1..4d8f4e1 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1135,9 +1135,9 @@
return false
}
-func (m *Module) HasLlndkStubs() bool {
+func (m *Module) NeedsLlndkVariants() bool {
lib := moduleLibraryInterface(m)
- return lib != nil && lib.hasLLNDKStubs()
+ return lib != nil && (lib.hasLLNDKStubs() || lib.hasLLNDKHeaders())
}
// isImplementationForLLNDKPublic returns true for any variant of a cc_library that has LLNDK stubs