diff options
author | Paul Duffin <paulduffin@google.com> | 2021-04-29 20:14:16 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-04-29 20:14:16 +0000 |
commit | ad7fa97f8d66e73c0e00cee2b920418b4b8f73e5 (patch) | |
tree | dbe4bd8c830569f83033f5767c9ed0d07d44d8fe /java/platform_bootclasspath.go | |
parent | 86477cfeb210252e477bcf712d8887c6157a57e8 (diff) | |
parent | 12d29b7786824ebc34ff6cc3e0e3b13dcfa27ec0 (diff) |
Merge "Move generation of hidden API make vars to platform_bootclasspath"
Diffstat (limited to 'java/platform_bootclasspath.go')
-rw-r--r-- | java/platform_bootclasspath.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go index d341591d3..9f1629428 100644 --- a/java/platform_bootclasspath.go +++ b/java/platform_bootclasspath.go @@ -163,7 +163,7 @@ func (b *platformBootclasspathModule) GenerateSingletonBuildActions(android.Sing } func (d *platformBootclasspathModule) MakeVars(ctx android.MakeVarsContext) { - // Placeholder for now. + d.generateHiddenApiMakeVars(ctx) } func (b *platformBootclasspathModule) GenerateAndroidBuildActions(ctx android.ModuleContext) { @@ -319,6 +319,16 @@ func (b *platformBootclasspathModule) generatedHiddenAPIMetadataRules(ctx androi rule.Build("platform-bootclasspath-monolithic-hiddenapi-metadata", "monolithic hidden API metadata") } +// generateHiddenApiMakeVars generates make variables needed by hidden API related make rules, e.g. +// veridex and run-appcompat. +func (b *platformBootclasspathModule) generateHiddenApiMakeVars(ctx android.MakeVarsContext) { + if ctx.Config().IsEnvTrue("UNSAFE_DISABLE_HIDDENAPI_FLAGS") { + return + } + // INTERNAL_PLATFORM_HIDDENAPI_FLAGS is used by Make rules in art/ and cts/. + ctx.Strict("INTERNAL_PLATFORM_HIDDENAPI_FLAGS", b.hiddenAPIFlagsCSV.String()) +} + // generateBootImageBuildActions generates ninja rules related to the boot image creation. func (b *platformBootclasspathModule) generateBootImageBuildActions(ctx android.ModuleContext, updatableModules []android.Module) { // Force the GlobalSoongConfig to be created and cached for use by the dex_bootjars |