Fix LOCAL_EXPORT_C_INCLUDE_DIRS processing
In order to strip the -I from the beginning of each flag, the androidmk
functionality expected every flag to be distinct. The existing
functionality was combining them with spaces if a module exported more
than one include directory at a time.
Change-Id: Ief5e22061c58f3d987557e938bae880509ffb121
diff --git a/cc/cc.go b/cc/cc.go
index 4cdcdf6..6be5b64 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1490,7 +1490,9 @@
func (f *flagExporter) exportIncludes(ctx ModuleContext, inc string) {
includeDirs := android.PathsForModuleSrc(ctx, f.Properties.Export_include_dirs)
- f.flags = append(f.flags, android.JoinWithPrefix(includeDirs.Strings(), inc))
+ for _, dir := range includeDirs.Strings() {
+ f.flags = append(f.flags, inc + dir)
+ }
}
func (f *flagExporter) reexportFlags(flags []string) {