aboutsummaryrefslogtreecommitdiffstats
path: root/cc/cc.go
diff options
context:
space:
mode:
authorJayant Chowdhary <jchowdhary@google.com>2017-04-20 06:53:59 -0700
committerJayant Chowdhary <jchowdhary@google.com>2017-06-01 13:32:21 -0700
commit8cede07e698cc1a15257a6b5dd653488e2bbf49e (patch)
tree2c6d11026a3bc1d27ec4be96162d2ac8b8e53aee /cc/cc.go
parent0f1bd9d3d73f1d1a673c23d5b180172c8c4605db (diff)
downloadbuild_soong-8cede07e698cc1a15257a6b5dd653488e2bbf49e.tar.gz
build_soong-8cede07e698cc1a15257a6b5dd653488e2bbf49e.tar.bz2
build_soong-8cede07e698cc1a15257a6b5dd653488e2bbf49e.zip
Optimizations to abi checking.
We now add export_static_lib_headers, export_generated_headers to the filters while dumping the abi of a library using header-abi-dumper (through -I<dir> additions to the invocation of header-abi-dumper and header-abi-linker) Also add support for zipped reference source based abi dumps. Test: mm -j64 in hardware/interfaces/nfc/default/1.0 produces android.hardware.nfc@1.0.so.lsdump with abi filtered out using generated headers. Test: Copied the linked abi dumps produced by mm -j64 in bionic/libc to prebuilts/abi-dumps/ndk and gzipped them. Ran mm -j64 again in bionic/libc and verified header-abi-diff getting invoked. Bug: 32750600 Merged-In: I4fa9f85c997a3832f18b81f0ecc782e7091566f0 Change-Id: I26210af908c87a6143e39fa25f50307acb68a387
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...)
+ }
}
}