aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-04-09 16:30:06 -0700
committerDan Willemsen <dwillemsen@google.com>2018-04-09 16:30:06 -0700
commita4155e8512fa66e431833b1399be6c2c55ce8f65 (patch)
treebc76fed6b16aa432fa8b9ca15d73068475c49126
parent5c19615b551e7de506e42d6127a05693c7aa04fd (diff)
downloadbuild-a4155e8512fa66e431833b1399be6c2c55ce8f65.tar.gz
Delay eval to save memory use in create-suite-dependencies
Instead of passing the entire contents of $(COMPATIBILITY.$(suite).FILES) to eval, which may keep that string around, delay the evaluation of that, and the new files until inside the eval. This saves ~2.8GB: 7.4GB -> 4.6GB of ckati max resident memory for a relatively small internal build. It also saves ~10% of the makefile loading time (81 -> 73 seconds). Test: build-aosp_arm.ninja is identical Change-Id: If45a4796f1bbf6d67dff388ea877a6115a4e06f4
-rw-r--r--core/definitions.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/definitions.mk b/core/definitions.mk
index 425da45a8f..fe966886cb 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -3117,7 +3117,7 @@ endef
define create-suite-dependencies
$(foreach suite, $(LOCAL_COMPATIBILITY_SUITE), \
$(eval COMPATIBILITY.$(suite).FILES := \
- $(COMPATIBILITY.$(suite).FILES) $(foreach f,$(my_compat_dist_$(suite)),$(call word-colon,2,$(f))))) \
+ $$(COMPATIBILITY.$(suite).FILES) $$(foreach f,$$(my_compat_dist_$(suite)),$$(call word-colon,2,$$(f))))) \
$(eval $(my_all_targets) : $(call copy-many-files, \
$(sort $(foreach suite,$(LOCAL_COMPATIBILITY_SUITE),$(my_compat_dist_$(suite))))))
endef