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
This commit is contained in:
Dan Willemsen
2020-06-08 18:50:14 -07:00
parent 83e9cfe291
commit fd1e67b8ce
8 changed files with 17 additions and 8 deletions

View File

@@ -173,4 +173,4 @@ $(my_exported_sdk_libs_file):
$(hide) echo $(PRIVATE_EXPORTED_SDK_LIBS) | tr ' ' '\n' > $@,\
$(hide) touch $@)
SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE)
SOONG_ALREADY_CONV += $(LOCAL_MODULE)