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/library.go b/cc/library.go
index af92b24..8f2127e 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -869,6 +869,7 @@
implementationModuleName(name string) string
hasLLNDKStubs() bool
+ hasLLNDKHeaders() bool
}
var _ libraryInterface = (*libraryDecorator)(nil)
@@ -1683,6 +1684,12 @@
return String(library.Properties.Llndk_stubs) != ""
}
+// hasLLNDKHeaders returns true if this cc_library module has a variant that provides headers
+// to a module that sets llndk.symbol_file.
+func (library *libraryDecorator) hasLLNDKHeaders() bool {
+ return Bool(library.Properties.Llndk.Llndk_headers)
+}
+
func (library *libraryDecorator) implementationModuleName(name string) string {
return name
}