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/soong_cc_prebuilt.mk b/core/soong_cc_prebuilt.mk
index 6317b53..986609b 100644
--- a/core/soong_cc_prebuilt.mk
+++ b/core/soong_cc_prebuilt.mk
@@ -51,7 +51,7 @@
ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES HEADER_LIBRARIES,$(LOCAL_MODULE_CLASS)),)
# Soong module is a static or shared library
- EXPORTS_LIST := $(EXPORTS_LIST) $(intermediates)
+ EXPORTS_LIST += $(intermediates)
EXPORTS.$(intermediates).FLAGS := $(LOCAL_EXPORT_CFLAGS)
EXPORTS.$(intermediates).DEPS := $(LOCAL_EXPORT_C_INCLUDE_DEPS)
@@ -61,7 +61,7 @@
$(my_all_targets): $(LOCAL_BUILT_MODULE).toc
endif
- SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE)
+ SOONG_ALREADY_CONV += $(LOCAL_MODULE)
my_link_type := $(LOCAL_SOONG_LINK_TYPE)
my_warn_types :=