diff options
author | 2024-12-11 00:40:51 +0000 | |
---|---|---|
committer | 2024-12-11 00:40:51 +0000 | |
commit | aecbbc24dea1a92b8ce7eab4fb88de128f4e46b7 (patch) | |
tree | 547ab24d81c43fe816961d073222d9c0424f0eb0 /apex/apex.go | |
parent | cbcc9091842356f0e3cf53c779a760397a5fdf98 (diff) | |
parent | c4179b5f7fc5e6de0ce27d9583ff5edfc93389c0 (diff) |
Merge "Convert checkApexAvailability to use ModuleProxy." into main am: c4179b5f7f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3400526
Change-Id: I1baae4c7e131522be7cc95440c948b58c16db6f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'apex/apex.go')
-rw-r--r-- | apex/apex.go | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/apex/apex.go b/apex/apex.go index c6b62b58c..21615e61b 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -2682,7 +2682,7 @@ func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) { return } - a.WalkPayloadDeps(ctx, func(ctx android.BaseModuleContext, from android.Module, to android.ApexModule, externalDep bool) bool { + a.WalkPayloadDepsProxy(ctx, func(ctx android.BaseModuleContext, from, to android.ModuleProxy, externalDep bool) bool { // As soon as the dependency graph crosses the APEX boundary, don't go further. if externalDep { return false @@ -2699,17 +2699,8 @@ func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) { fromName := ctx.OtherModuleName(from) toName := ctx.OtherModuleName(to) - // If `to` is not actually in the same APEX as `from` then it does not need - // apex_available and neither do any of its dependencies. - // - // It is ok to call DepIsInSameApex() directly from within WalkPayloadDeps(). - if am, ok := from.(android.DepIsInSameApex); ok && !am.DepIsInSameApex(ctx, to) { - // As soon as the dependency graph crosses the APEX boundary, don't go - // further. - return false - } - - if to.AvailableFor(apexName) { + if android.CheckAvailableForApex(apexName, + android.OtherModuleProviderOrDefault(ctx, to, android.ApexInfoProvider).ApexAvailableFor) { return true } |