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

Commit 1c31492c authored by Sasha Smundak's avatar Sasha Smundak
Browse files

Do not call sort when setting ALL_DEPS.MODULES.

This particular invocation of 'sort' is expensive (it may amount to 30%
of the total ckati execution time for the clean build).

Test: verify that the result of running 'm nothing' is unchanged,
verify that the result of running 'm -j deps-license
PROJ_PATH=packages/app/% DEP_PATH=external/%' is unchanged.

Change-Id: If1cfddd4dee24559a26ecceebdf03cf49cc5a367
parent 9be301eb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -777,7 +777,7 @@ INSTALLABLE_FILES.$(LOCAL_INSTALLED_MODULE).MODULE := $(my_register_name)
##########################################################
# Track module-level dependencies.
# Use $(LOCAL_MODULE) instead of $(my_register_name) to ignore module's bitness.
ALL_DEPS.MODULES := $(sort $(ALL_DEPS.MODULES) $(LOCAL_MODULE))
ALL_DEPS.MODULES := $(ALL_DEPS.MODULES) $(LOCAL_MODULE)
ALL_DEPS.$(LOCAL_MODULE).ALL_DEPS := $(sort \
  $(ALL_MODULES.$(LOCAL_MODULE).ALL_DEPS) \
  $(LOCAL_STATIC_LIBRARIES) \
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ $(if $(_gmad_new),$(eval $(1) += $(_gmad_new))\
endef

define print-deps-license
$(foreach m, $(ALL_DEPS.MODULES),\
$(foreach m, $(sort $(ALL_DEPS.MODULES)),\
  $(eval m_p := $(sort $(ALL_MODULES.$(m).PATH) $(ALL_MODULES.$(m)$(TARGET_2ND_ARCH_MODULE_SUFFIX).PATH)))\
  $(if $(filter $(PROJ_PATH),$(m_p)),\
    $(eval deps :=)\