summaryrefslogtreecommitdiff
path: root/cc/snapshot_utils.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2020-09-15 18:30:11 -0700
committer Colin Cross <ccross@android.com> 2020-10-06 13:39:57 -0700
commit56a8321c210bf73c7b9f177849ff4a6b6192d237 (patch)
tree493b42599afe8b2f4cc849107e5541f8307b7b10 /cc/snapshot_utils.go
parenta8baa884240d22fb2b896e714e2bdf28e735f332 (diff)
Remove global state from apex modules
A global variant was used to store the global mapping between modules and APEXes. Replace it with storing pointers to APEX contents inside each module so that they can query the contents of any APEXes they belong to. Bug: 146393795 Test: all Soong tests Test: single line change to build.ninja host install dependency ordering Test: no Android-${TARGET_PRODUCT}.mk, make_vars-${TARGET_PRODUCT}.mk or late-${TARGET_PRODUCT}.mk Change-Id: Id2d7b73ea27f8c3b41d30820bdd86b65c539bfa4
Diffstat (limited to 'cc/snapshot_utils.go')
-rw-r--r--cc/snapshot_utils.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cc/snapshot_utils.go b/cc/snapshot_utils.go
index f27d166f4..b72af4405 100644
--- a/cc/snapshot_utils.go
+++ b/cc/snapshot_utils.go
@@ -58,10 +58,10 @@ func (s *snapshotMap) get(name string, arch android.ArchType) (snapshot string,
return snapshot, found
}
-func isSnapshotAware(ctx android.ModuleContext, m *Module) bool {
- if _, _, ok := isVndkSnapshotLibrary(ctx.DeviceConfig(), m); ok {
+func isSnapshotAware(ctx android.ModuleContext, m *Module, apexInfo android.ApexInfo) bool {
+ if _, _, ok := isVndkSnapshotLibrary(ctx.DeviceConfig(), m, apexInfo); ok {
return ctx.Config().VndkSnapshotBuildArtifacts()
- } else if isVendorSnapshotModule(m, isVendorProprietaryPath(ctx.ModuleDir())) {
+ } else if isVendorSnapshotModule(m, isVendorProprietaryPath(ctx.ModuleDir()), apexInfo) {
return true
}
return false