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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user