Re-export exported includes from whole_static_libs
whole_static_libs is used to reexport all the symbols from a static
library when encapsulating it into another static library or shared
library, so reexport the headers as well.
Removes the need for libcxx to explicitly export the headers from
libcxxabi.
Change-Id: I283e043f2d2e819e2fdfa43b3f0f7a4537ba79ff
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,