summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-06-24 23:06:52 +0100
committerPaul Duffin <paulduffin@google.com>2021-06-28 16:05:04 +0100
commitfdb2fb6f1fc784f52601a63f501d2b650e6b5dec (patch)
treea7957cd960712e6ad315725078b4f462f47156d2 /java
parentfbaa8e9d6a7c02fa86c20ad681b6bd573a44c3e3 (diff)
Allow hiddenapi list to ignore missing classes/members
When generating the stub-flags.csv for a bootclasspath_fragment the hiddenapi list tool is not given a complete set of all classes and members. This change causes it to ignore them by passing the new --fragment option to it. This does not risk changing the flags as the stub-flags.csv files created with the --fragment option are compared with the monolithic out/soong/hiddenapi/hiddenapi-stub-flags.txt file which is not run with this option to ensure that they match. Bug: 179354495 Test: m out/soong/hiddenapi-stub-flags.csv - make sure that this does not change the file. Merged-In: I890c7374c445759cade4d685f51e81261b7ccea2 Change-Id: I890c7374c445759cade4d685f51e81261b7ccea2 (cherry picked from commit 156b5d3b61848fc7d41c1e94f92e532ae5142d2e)
Diffstat (limited to 'java')
-rw-r--r--java/hiddenapi_modular.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/hiddenapi_modular.go b/java/hiddenapi_modular.go
index ba53ea6f7..70bfdfb3f 100644
--- a/java/hiddenapi_modular.go
+++ b/java/hiddenapi_modular.go
@@ -316,6 +316,13 @@ func buildRuleToGenerateHiddenAPIStubFlagsFile(ctx android.BuilderContext, name,
FlagForEachInput("--dependency-stub-dex=", dependencyStubDexJars).
FlagForEachInput("--boot-dex=", bootDexJars)
+ // If no module stub flags paths are provided then this must be being called for a
+ // bootclasspath_fragment and not the whole platform_bootclasspath.
+ if moduleStubFlagsPaths == nil {
+ // This is being run on a fragment of the bootclasspath.
+ command.Flag("--fragment")
+ }
+
// Iterate over the api scopes in a fixed order.
for _, apiScope := range hiddenAPIFlagScopes {
// Merge in the stub dex jar paths for this api scope from the fragments on which it depends.