Add --dedup flag to generate-partition-aconfig-flag-file
When Soong creates per-module aconfig files by merging aconfig files
from dependencies $(sort) is no longer sufficient to dedup identical
flags. Pass --dedup to aconfig dump.
Fixes: 313698230
Test: m out/target/product/vsoc_x86_64/system/etc/aconfig_flags.pb
Change-Id: Icd8a3fbff8fe0be1dbb617ac1db4bd73f35b2d2f
diff --git a/core/packaging/flags.mk b/core/packaging/flags.mk
index a7e8d35..57df911 100644
--- a/core/packaging/flags.mk
+++ b/core/packaging/flags.mk
@@ -78,7 +78,7 @@
$(strip $(1)): $(ACONFIG) $(strip $(3))
mkdir -p $$(dir $$(PRIVATE_OUT))
$$(if $$(PRIVATE_IN), \
- $$(ACONFIG) dump --format protobuf --out $$(PRIVATE_OUT) \
+ $$(ACONFIG) dump --dedup --format protobuf --out $$(PRIVATE_OUT) \
$$(addprefix --cache ,$$(PRIVATE_IN)), \
echo -n > $$(PRIVATE_OUT) \
)