From 9ba2f4d022f545908e48dc1f75714db97089f9fd Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Mon, 24 Apr 2023 01:09:37 -0700 Subject: [PATCH] Save approx 18GB of RAM by not having a bazillion copies of the same modules names Bug: 278864904 Test: treehugger, m, manual inspection Change-Id: Ib564b3edf4a0523fc8231b8e57a5ba9c42a73294 --- core/definitions.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/definitions.mk b/core/definitions.mk index ce1248e2e9..94ee9d4b18 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -597,7 +597,7 @@ endef define declare-copy-target-license-metadata $(strip $(if $(filter $(OUT_DIR)%,$(2)),\ $(eval _tgt:=$(strip $(1)))\ - $(eval ALL_COPIED_TARGETS.$(_tgt).SOURCES := $(ALL_COPIED_TARGETS.$(_tgt).SOURCES) $(filter $(OUT_DIR)%,$(2)))\ + $(eval ALL_COPIED_TARGETS.$(_tgt).SOURCES := $(sort $(ALL_COPIED_TARGETS.$(_tgt).SOURCES) $(filter $(OUT_DIR)%,$(2))))\ $(eval ALL_COPIED_TARGETS += $(_tgt)))) endef