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
This commit is contained in:
Jiyong Park
2019-10-08 20:55:38 +09:00
parent 4b5438a9ea
commit 583a226c0e

View File

@@ -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
}
}
}
}