Merge "Add dedup flag to aconfig dump-cache calls." into main am: 01beacee28

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2955616

Change-Id: I31221f46e38b6a60ccb956af9208780e123b6a86
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Yu Liu
2024-02-08 21:33:25 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ var (
// For create-device-config-sysprops: Generate aconfig flag value map text file // For create-device-config-sysprops: Generate aconfig flag value map text file
aconfigTextRule = pctx.AndroidStaticRule("aconfig_text", aconfigTextRule = pctx.AndroidStaticRule("aconfig_text",
blueprint.RuleParams{ blueprint.RuleParams{
Command: `${aconfig} dump-cache --format='{fully_qualified_name}={state:bool}'` + Command: `${aconfig} dump-cache --dedup --format='{fully_qualified_name}={state:bool}'` +
` --cache ${in}` + ` --cache ${in}` +
` --out ${out}.tmp` + ` --out ${out}.tmp` +
` && ( if cmp -s ${out}.tmp ${out} ; then rm ${out}.tmp ; else mv ${out}.tmp ${out} ; fi )`, ` && ( if cmp -s ${out}.tmp ${out} ; then rm ${out}.tmp ; else mv ${out}.tmp ${out} ; fi )`,
@@ -56,7 +56,7 @@ var (
// For all_aconfig_declarations: Combine all parsed_flags proto files // For all_aconfig_declarations: Combine all parsed_flags proto files
AllDeclarationsRule = pctx.AndroidStaticRule("All_aconfig_declarations_dump", AllDeclarationsRule = pctx.AndroidStaticRule("All_aconfig_declarations_dump",
blueprint.RuleParams{ blueprint.RuleParams{
Command: `${aconfig} dump-cache --format protobuf --out ${out} ${cache_files}`, Command: `${aconfig} dump-cache --dedup --format protobuf --out ${out} ${cache_files}`,
CommandDeps: []string{ CommandDeps: []string{
"${aconfig}", "${aconfig}",
}, },
@@ -73,7 +73,7 @@ var (
blueprint.RuleParams{ blueprint.RuleParams{
Command: `rm -rf ${out}.tmp` + Command: `rm -rf ${out}.tmp` +
`&& for cache in ${cache_files}; do ` + `&& for cache in ${cache_files}; do ` +
` if [ -n "$$(${aconfig} dump-cache --cache $$cache --filter=is_exported:true --format='{fully_qualified_name}')" ]; then ` + ` if [ -n "$$(${aconfig} dump-cache --dedup --cache $$cache --filter=is_exported:true --format='{fully_qualified_name}')" ]; then ` +
` ${aconfig} create-java-lib --cache $$cache --mode=exported --out ${out}.tmp; ` + ` ${aconfig} create-java-lib --cache $$cache --mode=exported --out ${out}.tmp; ` +
` fi ` + ` fi ` +
`done` + `done` +

View File

@@ -277,7 +277,7 @@ var (
gatherReleasedFlaggedApisRule = pctx.AndroidStaticRule("gatherReleasedFlaggedApisRule", gatherReleasedFlaggedApisRule = pctx.AndroidStaticRule("gatherReleasedFlaggedApisRule",
blueprint.RuleParams{ blueprint.RuleParams{
Command: `${aconfig} dump-cache --format='{fully_qualified_name}={state:bool}' ` + Command: `${aconfig} dump-cache --dedup --format='{fully_qualified_name}={state:bool}' ` +
`--out ${out} ` + `--out ${out} ` +
`${flags_path} ` + `${flags_path} ` +
`${filter_args} `, `${filter_args} `,