diff options
Diffstat (limited to 'apex')
-rw-r--r-- | apex/apex.go | 15 | ||||
-rw-r--r-- | apex/prebuilt.go | 7 |
2 files changed, 14 insertions, 8 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 } diff --git a/apex/prebuilt.go b/apex/prebuilt.go index f93eada8b..aaf2cb77d 100644 --- a/apex/prebuilt.go +++ b/apex/prebuilt.go @@ -274,12 +274,15 @@ func (p *prebuiltCommon) prebuiltApexContentsDeps(ctx android.BottomUpMutatorCon } // Implements android.DepInInSameApex -func (p *prebuiltCommon) DepIsInSameApex(ctx android.BaseModuleContext, dep android.Module) bool { - tag := ctx.OtherModuleDependencyTag(dep) +func (p *prebuiltCommon) OutgoingDepIsInSameApex(tag blueprint.DependencyTag) bool { _, ok := tag.(exportedDependencyTag) return ok } +func (p *prebuiltCommon) IncomingDepIsInSameApex(tag blueprint.DependencyTag) bool { + return true +} + // apexInfoMutator marks any modules for which this apex exports a file as requiring an apex // specific variant and checks that they are supported. // |