summaryrefslogtreecommitdiff
path: root/java/platform_bootclasspath.go
diff options
context:
space:
mode:
author Adrian Roos <roosa@google.com> 2021-06-21 16:03:11 +0200
committer Adrian Roos <roosa@google.com> 2021-06-21 14:55:19 +0000
commite95a15e7c791028365f8360ad8915a851f09a3f0 (patch)
tree66f48db321b36315a3cc63e3e72f02f0a6788813 /java/platform_bootclasspath.go
parent789093a9ad402a829982432edb2fe9993919c1cf (diff)
Fix bootDexJarByModule with UNSAFE_DISABLE_HIDDENAPI_FLAGS
Fixes: 191652687 Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true m Change-Id: I7d85340681e54fbd0da69596b6846eb446c6ec6d
Diffstat (limited to 'java/platform_bootclasspath.go')
-rw-r--r--java/platform_bootclasspath.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go
index 02343adba..a4ab26e69 100644
--- a/java/platform_bootclasspath.go
+++ b/java/platform_bootclasspath.go
@@ -266,6 +266,8 @@ func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.
b.hiddenAPIIndexCSV = hiddenAPISingletonPaths(ctx).index
b.hiddenAPIMetadataCSV = hiddenAPISingletonPaths(ctx).metadata
+ bootDexJarByModule := extractBootDexJarsFromModules(ctx, modules)
+
// 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.
@@ -277,7 +279,7 @@ func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.
Output: path,
})
}
- return nil
+ return bootDexJarByModule
}
monolithicInfo := b.createAndProvideMonolithicHiddenAPIInfo(ctx, fragments)
@@ -292,7 +294,6 @@ func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.
input.FlagFilesByCategory = monolithicInfo.FlagsFilesByCategory
// Generate the monolithic stub-flags.csv file.
- bootDexJarByModule := extractBootDexJarsFromModules(ctx, modules)
stubFlags := hiddenAPISingletonPaths(ctx).stubFlags
rule := ruleToGenerateHiddenAPIStubFlagsFile(ctx, stubFlags, bootDexJarByModule.bootDexJars(), input)
rule.Build("platform-bootclasspath-monolithic-hiddenapi-stub-flags", "monolithic hidden API stub flags")