Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0feb97a4 authored by Dan Willemsen's avatar Dan Willemsen Committed by Luca Stefani
Browse files

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
parent a0c60f68
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -108,6 +108,12 @@ ALL_VINTF_MANIFEST_FRAGMENTS_LIST:=
# All tests that should be skipped in presubmit check.
ALL_DISABLED_PRESUBMIT_TESTS :=

# All LINK_TYPE entries
ALL_LINK_TYPES :=

# All modules already converted to Soong
SOONG_ALREADY_CONV :=

###########################################################
## Debugging; prints a variable list to stdout
###########################################################
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@

my_link_prefix := LINK_TYPE:$(call find-idf-prefix,$(my_kind),$(my_host_cross))$(if $(filter AUX,$(my_kind)),-$(AUX_OS_VARIANT)):$(if $(my_common),$(my_common):_,_:$(if $(my_2nd_arch_prefix),$(my_2nd_arch_prefix),_))
link_type := $(my_link_prefix):$(LOCAL_MODULE_CLASS):$(LOCAL_MODULE)
ALL_LINK_TYPES := $(ALL_LINK_TYPES) $(link_type)
ALL_LINK_TYPES += $(link_type)
$(link_type).TYPE := $(my_link_type)
$(link_type).MAKEFILE := $(LOCAL_MODULE_MAKEFILE)
$(link_type).WARN := $(my_warn_types)
+1 −1
Original line number Diff line number Diff line
@@ -189,4 +189,4 @@ ifdef LOCAL_SOONG_PRODUCT_RRO_DIRS
  )
endif

SOONG_ALREADY_CONV := $(SOONG_ALREADY_CONV) $(LOCAL_MODULE)
SOONG_ALREADY_CONV += $(LOCAL_MODULE)
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ ifneq ($(filter STATIC_LIBRARIES SHARED_LIBRARIES HEADER_LIBRARIES,$(LOCAL_MODUL
    $(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 :=
+1 −1
Original line number Diff line number Diff line
@@ -164,4 +164,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)