Add export_generated_headers
Similar to export_shared_library_headers, this will export headers
imported from a gensrcs or genrule.
Bug: 31742855
Test: Add export_generated_headers, ensure it's in out/soong/Android-*.mk
Change-Id: Ieadefd007ece8b249f011a258a9c5b27f5d3f594
diff --git a/cc/linker.go b/cc/linker.go
index 4ee38dc..2c4c250 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -67,6 +67,10 @@
// present in static_libs.
Export_static_lib_headers []string `android:"arch_variant"`
+ // list of generated headers to re-export include directories from. Entries must be
+ // present in generated_headers.
+ Export_generated_headers []string `android:"arch_variant"`
+
// don't link in crt_begin and crt_end. This flag should only be necessary for
// compiling crt or libc.
Nocrt *bool `android:"arch_variant"`
@@ -107,6 +111,7 @@
deps.ReexportStaticLibHeaders = append(deps.ReexportStaticLibHeaders, linker.Properties.Export_static_lib_headers...)
deps.ReexportSharedLibHeaders = append(deps.ReexportSharedLibHeaders, linker.Properties.Export_shared_lib_headers...)
+ deps.ReexportGeneratedHeaders = append(deps.ReexportGeneratedHeaders, linker.Properties.Export_generated_headers...)
if ctx.ModuleName() != "libcompiler_rt-extras" {
deps.LateStaticLibs = append(deps.LateStaticLibs, "libcompiler_rt-extras")