diff options
author | 2025-03-10 14:27:34 +0000 | |
---|---|---|
committer | 2025-03-10 14:27:34 +0000 | |
commit | a59e2641d73eb54da7d7f309a75be945f9505c4c (patch) | |
tree | acc3191cbe85aacd2894ad22a34926ac977306b5 /aconfig/init.go | |
parent | 8b09c4b7b6c98f09b789b0a4dda41afea08531bf (diff) |
check exported flags when building all_aconfig_declarations
This change adds extra step in the build of all_aconfig_declarations. It
will check whether all exported flags are valid. The exported flag is
valid if the flag is used for guarding API.
Test: m all_aconfig_declarations
Bug: 336800305
Change-Id: Ib1121e418f708b2ab290ed36aa3db7604cd04bdd
Diffstat (limited to 'aconfig/init.go')
-rw-r--r-- | aconfig/init.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/aconfig/init.go b/aconfig/init.go index b2fe5a309..d8d547022 100644 --- a/aconfig/init.go +++ b/aconfig/init.go @@ -77,6 +77,13 @@ var ( "${record-finalized-flags}", }, }, "api_signature_files", "finalized_flags_file", "parsed_flags_file") + ExportedFlagCheckRule = pctx.AndroidStaticRule("ExportedFlagCheckRule", + blueprint.RuleParams{ + Command: `${exported-flag-check} ${parsed_flags_file} ${finalized_flags_file} ${api_signature_files} > ${out}`, + CommandDeps: []string{ + "${exported-flag-check}", + }, + }, "api_signature_files", "finalized_flags_file", "parsed_flags_file") CreateStorageRule = pctx.AndroidStaticRule("aconfig_create_storage", blueprint.RuleParams{ @@ -124,6 +131,7 @@ func init() { pctx.HostBinToolVariable("aconfig", "aconfig") pctx.HostBinToolVariable("soong_zip", "soong_zip") pctx.HostBinToolVariable("record-finalized-flags", "record-finalized-flags") + pctx.HostBinToolVariable("exported-flag-check", "exported-flag-check") } func RegisterBuildComponents(ctx android.RegistrationContext) { |