Merge "Fix build failure when building unbundled apps" am: 5983d856c1
am: 7e953b936d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1690870 Change-Id: I24060082f5c72f6973c05d757b40089e4412b24f
This commit is contained in:
@@ -209,7 +209,17 @@ func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.
|
|||||||
// Don't run any hiddenapi rules if UNSAFE_DISABLE_HIDDENAPI_FLAGS=true. This is a performance
|
// 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
|
// 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.
|
// can be unsafe to use, e.g. when the changes affect anything that goes on the bootclasspath.
|
||||||
if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") {
|
// 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 {
|
||||||
paths := android.OutputPaths{b.hiddenAPIFlagsCSV, b.hiddenAPIIndexCSV, b.hiddenAPIMetadataCSV}
|
paths := android.OutputPaths{b.hiddenAPIFlagsCSV, b.hiddenAPIIndexCSV, b.hiddenAPIMetadataCSV}
|
||||||
for _, path := range paths {
|
for _, path := range paths {
|
||||||
ctx.Build(pctx, android.BuildParams{
|
ctx.Build(pctx, android.BuildParams{
|
||||||
|
Reference in New Issue
Block a user