summaryrefslogtreecommitdiff
path: root/apex/apex.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2024-12-11 08:49:33 -0800
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-12-11 08:49:33 -0800
commitc9237f7bb9887dee0d7412559df49d1ce7dddff0 (patch)
tree2f048756f7824934dd60b0aaa9b5edea7882fd2b /apex/apex.go
parent1f1e901cb1b9b4bbdcecb97a2c31cd620f0311f9 (diff)
parentf7bbd2fe40e43f7fda7e08d08eeb9c2a93552ad9 (diff)
Split DepIsInSameApex into outgoing and incoming am: f7bbd2fe40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3393290 Change-Id: Ia514f6b2e0bdc19f55a702d5942e8f7c909b44a4 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.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/apex/apex.go b/apex/apex.go
index 21615e61b..b0d2b54a7 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1215,7 +1215,13 @@ const (
var _ android.DepIsInSameApex = (*apexBundle)(nil)
// Implements android.DepInInSameApex
-func (a *apexBundle) DepIsInSameApex(_ android.BaseModuleContext, _ android.Module) bool {
+func (a *apexBundle) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool {
+ // direct deps of an APEX bundle are all part of the APEX bundle
+ // TODO(jiyong): shouldn't we look into the payload field of the dependencyTag?
+ return true
+}
+
+func (a *apexBundle) IncomingDepIsInSameApex(tag blueprint.DependencyTag) bool {
// direct deps of an APEX bundle are all part of the APEX bundle
// TODO(jiyong): shouldn't we look into the payload field of the dependencyTag?
return true
@@ -2097,17 +2103,14 @@ func (a *apexBundle) depVisitor(vctx *visitorContext, ctx android.ModuleContext,
// like to record requiredNativeLibs even when
// DepIsInSameAPex is false. We also shouldn't do
// this for host.
- //
- // TODO(jiyong): explain why the same module is passed in twice.
- // Switching the first am to parent breaks lots of tests.
- if !android.IsDepInSameApex(ctx, am, am) {
+ if !android.IsDepInSameApex(ctx, parent, am) {
return false
}
vctx.filesInfo = append(vctx.filesInfo, af)
return true // track transitive dependencies
} else if rm, ok := child.(*rust.Module); ok {
- if !android.IsDepInSameApex(ctx, am, am) {
+ if !android.IsDepInSameApex(ctx, parent, am) {
return false
}