Optionally dump RBC variables at the end of config.mk am: ec8316de2e

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

Change-Id: Ia4f6119c1f325cf26198891d9d17fc26c63cc7f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Cole Faust 2022-04-14 17:38:44 +00:00 committed by Automerger Merge Worker
commit 414100caeb
3 changed files with 19 additions and 9 deletions

View file

@ -35,3 +35,7 @@ dump-many-vars :
printf "'\n";)
endif # CALLED_FROM_SETUP
ifneq (,$(RBC_DUMP_CONFIG_FILE))
$(call dump-variables-rbc,$(RBC_DUMP_CONFIG_FILE))
endif

View file

@ -326,20 +326,26 @@ endif
# raw ones.
define dump-variables-rbc
$(eval _dump_variables_rbc_excluded := \
BOARD_PLAT_PRIVATE_SEPOLICY_DIR \
BOARD_PLAT_PUBLIC_SEPOLICY_DIR \
BUILD_NUMBER \
DATE \
LOCAL_PATH \
MAKEFILE_LIST \
PRODUCTS \
PRODUCT_COPY_OUT_% \
RBC_PRODUCT_CONFIG \
RBC_BOARD_CONFIG \
SOONG_% \
TOPDIR \
TRACE_BEGIN_SOONG \
BOARD_PLAT_PUBLIC_SEPOLICY_DIR \
BOARD_PLAT_PRIVATE_SEPOLICY_DIR \
USER \
SOONG_% \
PRODUCT_COPY_OUT_%)\
$(file >$(OUT_DIR)/dump-variables-rbc-temp.txt,$(subst $(space),$(newline),$(filter-out $(_dump_variables_rbc_excluded),$(.VARIABLES))))
USER)
$(file >$(OUT_DIR)/dump-variables-rbc-temp.txt,$(subst $(space),$(newline),$(sort $(filter-out $(_dump_variables_rbc_excluded),$(.VARIABLES)))))
$(file >$(1),\
$(foreach v, $(shell grep -he "^[A-Z][A-Z0-9_]*$$" $(OUT_DIR)/dump-variables-rbc-temp.txt),\
$(v) := $(strip $($(v)))$(newline))\
$(foreach ns,$(SOONG_CONFIG_NAMESPACES),\
$(foreach v,$(SOONG_CONFIG_$(ns)),\
$(foreach ns,$(sort $(SOONG_CONFIG_NAMESPACES)),\
$(foreach v,$(sort $(SOONG_CONFIG_$(ns))),\
$$(call soong_config_set,$(ns),$(v),$(SOONG_CONFIG_$(ns)_$(v)))$(newline))))
endef

View file

@ -162,7 +162,7 @@ def _product_configuration(top_pcm_name, top_pcm, input_variables_init):
globals["PRODUCTS."+name+".mk.ARTIFACT_PATH_ALLOWED_LIST"] = handle.artifact_path_allowed_list
globals["PRODUCTS."+name+".mk.ARTIFACT_PATH_REQUIREMENT_IS_RELAXED"] = "true" if handle.artifact_path_requirement_is_relaxed[0] else ""
globals.setdefault("ARTIFACT_PATH_REQUIREMENT_PRODUCTS", [])
globals["ARTIFACT_PATH_REQUIREMENT_PRODUCTS"] += [name+".mk"]
globals["ARTIFACT_PATH_REQUIREMENT_PRODUCTS"] = sorted(globals["ARTIFACT_PATH_REQUIREMENT_PRODUCTS"] + [name+".mk"])
# Now we know everything about this PCM, record it in 'configs'.
children = handle.inherited_modules