diff options
author | 2020-04-27 17:08:37 +0100 | |
---|---|---|
committer | 2020-05-04 18:01:09 +0100 | |
commit | 872a144dca543f40ee232f26e0233e580d97e86d (patch) | |
tree | f8a78ec4c56e2d5d4b563bfecd1b66906e343308 /apex/apex.go | |
parent | 9d6ea77c52fda15bae9b0364de1d94ced900bd20 (diff) |
Export depsInfo into android package.
Move depsInfo into android for easier sharing with APK code.
Bug: 149622332
Test: m, diff'ing outputs for conscrypt module.
Change-Id: If0ee967d37425540e69b4ce9304229d9f2cd86bd
Diffstat (limited to 'apex/apex.go')
-rw-r--r-- | apex/apex.go | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/apex/apex.go b/apex/apex.go index a2a75efa0..d196e95e9 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1276,12 +1276,6 @@ func (af *apexFile) AvailableToPlatform() bool { return false } -type depInfo struct { - to string - from []string - isExternal bool -} - type apexBundle struct { android.ModuleBase android.DefaultableModuleBase @@ -1316,7 +1310,7 @@ type apexBundle struct { requiredDeps []string // list of module names that this APEX is including (to be shown via *-deps-info target) - depInfos map[string]depInfo + android.ApexBundleDepsInfo testApex bool vndkApex bool @@ -1890,35 +1884,6 @@ func (a *apexBundle) checkUpdatable(ctx android.ModuleContext) { } } -// Collects the list of module names that directly or indirectly contributes to the payload of this APEX -func (a *apexBundle) collectDepsInfo(ctx android.ModuleContext) { - a.depInfos = make(map[string]depInfo) - a.walkPayloadDeps(ctx, func(ctx android.ModuleContext, from blueprint.Module, to android.ApexModule, externalDep bool) bool { - if from.Name() == to.Name() { - // This can happen for cc.reuseObjTag. We are not interested in tracking this. - // As soon as the dependency graph crosses the APEX boundary, don't go further. - return !externalDep - } - - if info, exists := a.depInfos[to.Name()]; exists { - if !android.InList(from.Name(), info.from) { - info.from = append(info.from, from.Name()) - } - info.isExternal = info.isExternal && externalDep - a.depInfos[to.Name()] = info - } else { - a.depInfos[to.Name()] = depInfo{ - to: to.Name(), - from: []string{from.Name()}, - isExternal: externalDep, - } - } - - // As soon as the dependency graph crosses the APEX boundary, don't go further. - return !externalDep - }) -} - func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { buildFlattenedAsDefault := ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild() switch a.properties.ApexType { @@ -1956,7 +1921,6 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { a.checkApexAvailability(ctx) a.checkUpdatable(ctx) - a.collectDepsInfo(ctx) handleSpecialLibs := !android.Bool(a.properties.Ignore_system_library_special_case) |