From 2fef136885b7b82162428d3a30bc310de2b024ec Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 15 Apr 2021 13:32:00 +0100 Subject: Generate hidden API flags for a bootclasspath_fragment This change adds support for generating the hidden API flags for the contents of a bootclasspath_fragment. Currently, it will only work for the art-bootclasspath-fragment as it has no support for creating dependencies between bootclasspath_fragment modules which will be needed for handling any other bootclasspath_fragment. The hidden API flag generation added by this change is completely separate to the normal hidden API processing and is not as yet encoded in dex jars so will have no effect on the runtime. The generated files are provided for use by other modules and copied into the sdk snapshot. That is needed to allow the build to verify that the hidden API flags generated by the individual bootclasspath_fragment modules are consistent with the flags generated for the whole bootclasspath, whether building from source or prebuilts. Bug: 179354495 Test: m art-module-sdk m out/soong/.intermediates/art/build/boot/art-bootclasspath-fragment/android_common_apex10000/modular-hiddenapi/all-flags.csv m out/soong/hiddenapi/hiddenapi-flags.csv - test that the former file is a subset of the latter and that where they overlap they are identical. Change-Id: Ie27303e2960953db1b7abe95510e3bca4411b09a --- java/platform_bootclasspath.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'java/platform_bootclasspath.go') diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go index 1feed3ddd..b5fec95fe 100644 --- a/java/platform_bootclasspath.go +++ b/java/platform_bootclasspath.go @@ -364,7 +364,7 @@ func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android. outputPath := hiddenAPISingletonPaths(ctx).flags baseFlagsPath := hiddenAPISingletonPaths(ctx).stubFlags - ruleToGenerateHiddenApiFlags(ctx, outputPath, baseFlagsPath, moduleSpecificFlagsPaths, flagFileInfo) + buildRuleToGenerateHiddenApiFlags(ctx, "hiddenAPIFlagsFile", "hiddenapi flags", outputPath, baseFlagsPath, moduleSpecificFlagsPaths, &flagFileInfo) b.generateHiddenAPIStubFlagsRules(ctx, hiddenAPISupportingModules) b.generateHiddenAPIIndexRules(ctx, hiddenAPISupportingModules) -- cgit v1.2.3-59-g8ed1b