LLNDK can re-export headers
Added export_llndk_headers properties to llndk_library module. And a new
module type llndk_headers is added. This is to enable an LLNDK library
to reexport other LLNDK headers.
Bug: 65395259
Test: do the following
// frameworks/native/libs/arect/Android.bp
llndk_headers {
name: "libarect_vendor_headers",
export_include_dirs: ["include"],
}
// frameworks/native/libs/nativewindow/Android.bp
llndk_library {
name: "libnativewindow",
....
export_llndk_headers: ["libarect_vendor_headers"],
}
check that
-Iframeworks/native/libs/arect/include is in LOCAL_EXPORT_CFLAGS of
libnativewindow.vendor in out/soong/Android-<product>.mk
Change-Id: If1650414b2967f2042f4ebe2b593ed3f3ea45d3a
diff --git a/cc/cc.go b/cc/cc.go
index b423ca6..cdbe43e 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1402,6 +1402,9 @@
// LL-NDK stubs only exist in the vendor variant, since the
// real libraries will be used in the core variant.
mctx.CreateVariations(vendorMode)
+ } else if _, ok := m.linker.(*llndkHeadersDecorator); ok {
+ // ... and LL-NDK headers as well
+ mctx.CreateVariations(vendorMode)
} else if m.hasVendorVariant() {
// This will be available in both /system and /vendor
// or a /system directory that is available to vendor.