Merge "Re-export exported includes from whole_static_libs"
diff --git a/cc/cc.go b/cc/cc.go
index 992982d..575d027 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -172,7 +172,7 @@
}
type CCDeps struct {
- StaticLibs, SharedLibs, LateStaticLibs, WholeStaticLibs, ObjFiles, Cflags []string
+ StaticLibs, SharedLibs, LateStaticLibs, WholeStaticLibs, ObjFiles, Cflags, ReexportedCflags []string
WholeStaticLibObjFiles []string
@@ -734,6 +734,7 @@
wholeStaticLibModules, depPaths.WholeStaticLibs, newCflags =
c.depsToPathsFromList(ctx, depNames.WholeStaticLibs)
depPaths.Cflags = append(depPaths.Cflags, newCflags...)
+ depPaths.ReexportedCflags = append(depPaths.ReexportedCflags, newCflags...)
for _, m := range wholeStaticLibModules {
if staticLib, ok := m.(ccLibraryInterface); ok && staticLib.static() {
@@ -1202,6 +1203,7 @@
common.CheckModuleSrcDirsExist(ctx, c.Properties.Export_include_dirs, "export_include_dirs")
includeDirs := pathtools.PrefixPaths(c.Properties.Export_include_dirs, common.ModuleSrcDir(ctx))
c.exportFlags = []string{includeDirsToFlags(includeDirs)}
+ c.exportFlags = append(c.exportFlags, deps.ReexportedCflags...)
ctx.CheckbuildFile(outputFile)
}
@@ -1232,6 +1234,7 @@
c.out = outputFile
includeDirs := pathtools.PrefixPaths(c.Properties.Export_include_dirs, common.ModuleSrcDir(ctx))
c.exportFlags = []string{includeDirsToFlags(includeDirs)}
+ c.exportFlags = append(c.exportFlags, deps.ReexportedCflags...)
}
func (c *CCLibrary) compileModule(ctx common.AndroidModuleContext,