From 583a226c0ed2c543f91459a0ce724f46bceb2614 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Tue, 8 Oct 2019 20:55:38 +0900 Subject: [PATCH] Don't check apex_available for host The check doesn't make sense for host. Test: ALLOW_MISSING_DEPENDENCIES=true DIST_DIR=out/dist ./art/tools/dist_linux_bionic.sh -j110 com.android.art.host is successful Change-Id: Icdb4bb557a83b3c8044e6c73721dab47c56888a1 --- apex/apex.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apex/apex.go b/apex/apex.go index 000792aaa..8b2dcbeff 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1191,11 +1191,13 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) { }) // check apex_available requirements - for _, fi := range filesInfo { - if am, ok := fi.module.(android.ApexModule); ok { - if !am.AvailableFor(ctx.ModuleName()) { - ctx.ModuleErrorf("requires %q that is not available for the APEX", fi.module.Name()) - return + if !ctx.Host() { + for _, fi := range filesInfo { + if am, ok := fi.module.(android.ApexModule); ok { + if !am.AvailableFor(ctx.ModuleName()) { + ctx.ModuleErrorf("requires %q that is not available for the APEX", fi.module.Name()) + return + } } } }