aboutsummaryrefslogtreecommitdiffstats
path: root/cc/cc.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/cc.go')
-rw-r--r--cc/cc.go12
1 files changed, 10 insertions, 2 deletions
diff --git a/cc/cc.go b/cc/cc.go
index 6e2f6a50..a10aaaac 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -428,8 +428,7 @@ func (ctx *moduleContextImpl) vndk() bool {
// Create source abi dumps if the module belongs to the list of VndkLibraries.
func (ctx *moduleContextImpl) createVndkSourceAbiDump() bool {
- return ctx.ctx.Device() && (inList(ctx.baseModuleName(), config.LLndkLibraries())) ||
- (inList(ctx.baseModuleName(), config.VndkLibraries()))
+ return ctx.ctx.Device() && ((Bool(ctx.mod.Properties.Vendor_available)) || (inList(ctx.baseModuleName(), config.LLndkLibraries())))
}
func (ctx *moduleContextImpl) selectedStl() string {
@@ -917,6 +916,9 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
depPaths.ReexportedFlags = append(depPaths.ReexportedFlags, flags)
depPaths.ReexportedFlagsDeps = append(depPaths.ReexportedFlagsDeps,
genRule.GeneratedSourceFiles()...)
+ // Add these re-exported flags to help header-abi-dumper to infer the abi exported by a library.
+ c.sabi.Properties.ReexportedIncludeFlags = append(c.sabi.Properties.ReexportedIncludeFlags, flags)
+
}
} else {
ctx.ModuleErrorf("module %q is not a genrule", name)
@@ -963,6 +965,12 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
if t.reexportFlags {
depPaths.ReexportedFlags = append(depPaths.ReexportedFlags, flags...)
depPaths.ReexportedFlagsDeps = append(depPaths.ReexportedFlagsDeps, deps...)
+ // Add these re-exported flags to help header-abi-dumper to infer the abi exported by a library.
+ // Re-exported flags from shared library dependencies are not included as those shared libraries
+ // will be included in the vndk set.
+ if tag == staticExportDepTag || tag == headerExportDepTag {
+ c.sabi.Properties.ReexportedIncludeFlags = append(c.sabi.Properties.ReexportedIncludeFlags, flags...)
+ }
}
}