soong: Make export_cflags configurable
Change-Id: Ie9f42b40a5742cbc1ae1abd96e42d8b1fa8790db
diff --git a/cc/library.go b/cc/library.go
index 654f66b..ef3ccd2 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -199,7 +199,7 @@
Export_system_include_dirs []string `android:"arch_variant,variant_prepend"`
// list of plain cc flags to be used for any module that links against this module.
- Export_cflags []string `android:"arch_variant"`
+ Export_cflags proptools.Configurable[[]string] `android:"arch_variant"`
Target struct {
Vendor, Product struct {
@@ -312,7 +312,7 @@
}
func (f *flagExporter) exportExtraFlags(ctx ModuleContext) {
- f.flags = append(f.flags, f.Properties.Export_cflags...)
+ f.flags = append(f.flags, f.Properties.Export_cflags.GetOrDefault(ctx, nil)...)
}
// exportIncludesAsSystem registers the include directories and system include directories to be