Merge "Only include this partition's flags in aconfig_flags.pb" into main am: 8522c2e8af
Original change: https://android-review.googlesource.com/c/platform/build/+/3149079 Change-Id: I8cbbf205185d6e308c4b80a940003e917fe5bd4e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -27,9 +27,27 @@ _FLAG_PARTITIONS := product system system_ext vendor
|
|||||||
# Create a summary file of build flags for each partition
|
# Create a summary file of build flags for each partition
|
||||||
# $(1): built aconfig flags file (out)
|
# $(1): built aconfig flags file (out)
|
||||||
# $(2): installed aconfig flags file (out)
|
# $(2): installed aconfig flags file (out)
|
||||||
# $(3): input aconfig files for the partition (in)
|
# $(3): the partition (in)
|
||||||
|
# $(4): input aconfig files for the partition (in)
|
||||||
define generate-partition-aconfig-flag-file
|
define generate-partition-aconfig-flag-file
|
||||||
$(eval $(strip $(1)): PRIVATE_OUT := $(strip $(1)))
|
$(eval $(strip $(1)): PRIVATE_OUT := $(strip $(1)))
|
||||||
|
$(eval $(strip $(1)): PRIVATE_IN := $(strip $(4)))
|
||||||
|
$(strip $(1)): $(ACONFIG) $(strip $(4))
|
||||||
|
mkdir -p $$(dir $$(PRIVATE_OUT))
|
||||||
|
$$(if $$(PRIVATE_IN), \
|
||||||
|
$$(ACONFIG) dump --dedup --format protobuf --out $$(PRIVATE_OUT) \
|
||||||
|
--filter container:$$(strip $(3)) $$(addprefix --cache ,$$(PRIVATE_IN)), \
|
||||||
|
echo -n > $$(PRIVATE_OUT) \
|
||||||
|
)
|
||||||
|
$(call copy-one-file, $(1), $(2))
|
||||||
|
endef
|
||||||
|
|
||||||
|
# Create a summary file of build flags for each partition
|
||||||
|
# $(1): built aconfig flags file (out)
|
||||||
|
# $(2): installed aconfig flags file (out)
|
||||||
|
# $(3): input aconfig files for the partition (in)
|
||||||
|
define generate-global-aconfig-flag-file
|
||||||
|
$(eval $(strip $(1)): PRIVATE_OUT := $(strip $(1)))
|
||||||
$(eval $(strip $(1)): PRIVATE_IN := $(strip $(3)))
|
$(eval $(strip $(1)): PRIVATE_IN := $(strip $(3)))
|
||||||
$(strip $(1)): $(ACONFIG) $(strip $(3))
|
$(strip $(1)): $(ACONFIG) $(strip $(3))
|
||||||
mkdir -p $$(dir $$(PRIVATE_OUT))
|
mkdir -p $$(dir $$(PRIVATE_OUT))
|
||||||
@@ -47,6 +65,7 @@ $(foreach partition, $(_FLAG_PARTITIONS), \
|
|||||||
$(eval $(call generate-partition-aconfig-flag-file, \
|
$(eval $(call generate-partition-aconfig-flag-file, \
|
||||||
$(TARGET_OUT_FLAGS)/$(partition)/aconfig_flags.pb, \
|
$(TARGET_OUT_FLAGS)/$(partition)/aconfig_flags.pb, \
|
||||||
$(aconfig_flag_summaries_protobuf.$(partition)), \
|
$(aconfig_flag_summaries_protobuf.$(partition)), \
|
||||||
|
$(partition), \
|
||||||
$(sort $(foreach m,$(call register-names-for-partition, $(partition)), \
|
$(sort $(foreach m,$(call register-names-for-partition, $(partition)), \
|
||||||
$(ALL_MODULES.$(m).ACONFIG_FILES) \
|
$(ALL_MODULES.$(m).ACONFIG_FILES) \
|
||||||
)), \
|
)), \
|
||||||
@@ -61,7 +80,7 @@ required_aconfig_flags_files := \
|
|||||||
|
|
||||||
.PHONY: device_aconfig_declarations
|
.PHONY: device_aconfig_declarations
|
||||||
device_aconfig_declarations: $(PRODUCT_OUT)/device_aconfig_declarations.pb
|
device_aconfig_declarations: $(PRODUCT_OUT)/device_aconfig_declarations.pb
|
||||||
$(eval $(call generate-partition-aconfig-flag-file, \
|
$(eval $(call generate-global-aconfig-flag-file, \
|
||||||
$(TARGET_OUT_FLAGS)/device_aconfig_declarations.pb, \
|
$(TARGET_OUT_FLAGS)/device_aconfig_declarations.pb, \
|
||||||
$(PRODUCT_OUT)/device_aconfig_declarations.pb, \
|
$(PRODUCT_OUT)/device_aconfig_declarations.pb, \
|
||||||
$(sort $(required_aconfig_flags_files)) \
|
$(sort $(required_aconfig_flags_files)) \
|
||||||
|
Reference in New Issue
Block a user