Add some comments for VNDK / vendor snapshots
Also some files are refactored:
- snapshot_prebuilt.go is separated from vendor_snapshot.go. Now
vendor_snapshot.go contains snapshot generation codes, while
snapshot_prebuilt.go contains module definition codes.
- Some helper functions are moved from snapshot_utils.go to util.go.
- Some ambiguous names of types and functions are renamed.
We still can add more detailed comments about the snapshots. They are to
be uploaded in follow-up changes, to avoid making this change too big.
Bug: 173474311
Test: generate vndk and vendor snapshot
Change-Id: I18fa837ccdf44a042b7a78e5c3df25fd2de96d95
diff --git a/cc/cc.go b/cc/cc.go
index 986bf2b..7baaa66 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1595,7 +1595,7 @@
// 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, apexInfo) {
+ if shouldCollectHeadersForSnapshot(ctx, c, apexInfo) {
i.collectHeadersForSnapshot(ctx)
}
}