From e9612824eab65f17d74c45f4ca1d751753772007 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Wed, 10 Mar 2021 15:25:59 +0000 Subject: [PATCH] Avoid calling DepIsInSameApex when excluded from apex contents While debugging an issue with some work I was doing on boot image modules I noticed that markPlatformAvailability() is calling DepIsInSameApex() even when the dependency tag indicates that it is excluded from the apex contents. Test: m droid Change-Id: Iac49049546a886f7a3a0d9640ffd31ce24c61364 --- apex/apex.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apex/apex.go b/apex/apex.go index efd1736db..35b4ba83e 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -970,6 +970,10 @@ func markPlatformAvailability(mctx android.BottomUpMutatorContext) { // If any of the dep is not available to platform, this module is also considered as being // not available to platform even if it has "//apex_available:platform" mctx.VisitDirectDeps(func(child android.Module) { + depTag := mctx.OtherModuleDependencyTag(child) + if _, ok := depTag.(android.ExcludeFromApexContentsTag); ok { + return + } if !am.DepIsInSameApex(mctx, child) { // if the dependency crosses apex boundary, don't consider it return