From d2c81a79331910e0a94ba3819d6e00c8f90fcbd6 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Fri, 28 Aug 2020 13:15:36 -0700 Subject: [PATCH] Remove hack for platform availability of modules with missing apexes The affected modules weren't actually built in the affected build, delay the platform availability check in Make instead to allow the build to proceed. Bug: 154888298 Test: m checkbuild Change-Id: I21778e38e04635545b352dee2043a33ec9da246b --- apex/apex.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/apex/apex.go b/apex/apex.go index 84a1e7526..10c41483a 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -747,18 +747,6 @@ func markPlatformAvailability(mctx android.BottomUpMutatorContext) { if am, ok := mctx.Module().(android.ApexModule); ok { availableToPlatform := am.AvailableFor(android.AvailableToPlatform) - // In a rare case when a lib is marked as available only to an apex - // but the apex doesn't exist. This can happen in a partial manifest branch - // like master-art. Currently, libstatssocket in the stats APEX is causing - // this problem. - // Include the lib in platform because the module SDK that ought to provide - // it doesn't exist, so it would otherwise be left out completely. - // TODO(b/154888298) remove this by adding those libraries in module SDKS and skipping - // this check for libraries provided by SDKs. - if !availableToPlatform && !android.InAnyApex(am.Name()) { - availableToPlatform = true - } - // 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) {