Merge "Revert "Fix build failure when building unbundled apps"" am: 1468cc4a10 am: 00803e6ee9

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1691213

Change-Id: If8752e8d442d5141af41b9e607e78634a0121cf7
This commit is contained in:
Treehugger Robot 2021-04-30 03:22:59 +00:00 committed by Automerger Merge Worker
commit 60fd78300a
1 changed files with 1 additions and 11 deletions

View File

@ -209,17 +209,7 @@ func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.
// Don't run any hiddenapi rules if UNSAFE_DISABLE_HIDDENAPI_FLAGS=true. This is a performance
// optimization that can be used to reduce the incremental build time but as its name suggests it
// can be unsafe to use, e.g. when the changes affect anything that goes on the bootclasspath.
// Instead create some rules to create fake hidden api files.
config := ctx.Config()
fakeHiddenApiRules := config.IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS")
// Don't run them in an unbundled build either because the chances are that the modules needed
// are not available.
fakeHiddenApiRules = fakeHiddenApiRules || config.UnbundledBuild()
// Don't run them when always using prebuilts as they won't necessarily have the dex boot jars
// available.
if fakeHiddenApiRules {
if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") {
paths := android.OutputPaths{b.hiddenAPIFlagsCSV, b.hiddenAPIIndexCSV, b.hiddenAPIMetadataCSV}
for _, path := range paths {
ctx.Build(pctx, android.BuildParams{