Capture snapshot headers in parallel

VNDK and vendor snapshot singleton work in a single thread, so globbing
in singleton results in ridiculus running time. Moving codes to
GenerateAndroidBuildActions to reduce running time.

Bug: 150406226
Test: VNDK_SNAPSHOT_BUILD_ARTIFACTS=true m dist vndk vendor-snapshot
Test: vendorSnapshotSingleton build time became 0.56s (from 10s)
Test: build.ninja building time became 1m11s (from 1m21s)
Change-Id: I4a081eef5847c62ca00280ca426f5b4e10f87b59
This commit is contained in:
Inseob Kim
2020-03-03 22:06:32 +09:00
parent 193d3b8e86
commit eda2e9c728
5 changed files with 112 additions and 82 deletions

View File

@@ -1465,6 +1465,13 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
c.Properties.HideFromMake = false // unhide
// Note: this is still non-installable
}
// glob exported headers for snapshot, if BOARD_VNDK_VERSION is current.
if i, ok := c.linker.(snapshotLibraryInterface); ok && ctx.DeviceConfig().VndkVersion() == "current" {
if isSnapshotAware(ctx, c) {
i.collectHeadersForSnapshot(ctx)
}
}
}
if c.installable() {