More performance improvements
Instead of using `x := $(x) foo`, make sure `x` is initialized first,
then use `x += foo`.
For a aosp-master/aosp_crosshatch-userdebug build, this takes the build
from 49s to 33s (no significant difference in peak memory)
Bug: 158488548
Test: build-aosp_crosshatch.ninja is the same before/after
Change-Id: I41fb7611030dd3ba824f896a9c9eadbdd218f464
diff --git a/core/binary.mk b/core/binary.mk
index b14d8b8..4894bf2 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -1799,7 +1799,7 @@
$(call intermediates-dir-for,HEADER_LIBRARIES,$(l),$(my_kind),,$(LOCAL_2ND_ARCH_VAR_PREFIX),$(my_host_cross))))
ifneq ($(strip $(my_export_c_include_dirs)$(export_include_deps)),)
- EXPORTS_LIST := $(EXPORTS_LIST) $(intermediates)
+ EXPORTS_LIST += $(intermediates)
EXPORTS.$(intermediates).FLAGS := $(foreach d,$(my_export_c_include_dirs),-I $(call clean-path,$(d)))
EXPORTS.$(intermediates).REEXPORT := $(export_include_deps)
EXPORTS.$(intermediates).DEPS := $(my_export_c_include_deps) $(my_generated_sources) $(LOCAL_EXPORT_C_INCLUDE_DEPS)