Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8522c2e8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Only include this partition's flags in aconfig_flags.pb" into main

parents 93e0aad0 acbe15ec
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
@@ -27,9 +27,27 @@ _FLAG_PARTITIONS := product system system_ext vendor
# 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)
# $(3): the partition (in)
# $(4): input aconfig files for the partition (in)
define generate-partition-aconfig-flag-file
$(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)))
$(strip $(1)): $(ACONFIG) $(strip $(3))
	mkdir -p $$(dir $$(PRIVATE_OUT))
@@ -47,6 +65,7 @@ $(foreach partition, $(_FLAG_PARTITIONS), \
	$(eval $(call generate-partition-aconfig-flag-file, \
				$(TARGET_OUT_FLAGS)/$(partition)/aconfig_flags.pb, \
				$(aconfig_flag_summaries_protobuf.$(partition)), \
				$(partition), \
				$(sort $(foreach m,$(call register-names-for-partition, $(partition)), \
					$(ALL_MODULES.$(m).ACONFIG_FILES) \
				)), \
@@ -61,7 +80,7 @@ required_aconfig_flags_files := \

.PHONY: device_aconfig_declarations
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, \
			$(PRODUCT_OUT)/device_aconfig_declarations.pb, \
			$(sort $(required_aconfig_flags_files)) \