Handle dependencies with export_generated_headers
This sets up the proper dependencies within Soong by adding the imported
dependencies into GeneratedHeaders, and re-exporting them as necessary.
It also exports them to Make using the new LOCAL_EXPORT_C_INCLUDE_DEPS.
Bug: 31742855
Test: Inspection, build hardware/interfaces (pending)
Change-Id: I6a10ceec377a97966baa9d4876b90fcda391dd01
diff --git a/cc/androidmk.go b/cc/androidmk.go
index 676ae30..a4d7fcf 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -100,6 +100,10 @@
if len(exportedIncludes) > 0 {
fmt.Fprintln(w, "LOCAL_EXPORT_C_INCLUDE_DIRS :=", strings.Join(exportedIncludes, " "))
}
+ exportedIncludeDeps := library.exportedFlagsDeps()
+ if len(exportedIncludeDeps) > 0 {
+ fmt.Fprintln(w, "LOCAL_EXPORT_C_INCLUDE_DEPS :=", strings.Join(exportedIncludeDeps.Strings(), " "))
+ }
fmt.Fprintln(w, "LOCAL_BUILT_MODULE_STEM := $(LOCAL_MODULE)"+outputFile.Ext())