summaryrefslogtreecommitdiff
path: root/RepositoryModule_host.mk
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-04-21 11:48:10 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-04-21 14:17:58 +0200
commitc74b7dadd53a3821451c6bed93988eea1743f141 (patch)
treea5f2ef76f70c6dee0f5b2b674d9b5dbaf8cc05a8 /RepositoryModule_host.mk
parent347622a98f512dae709f938a85498dcdcf9f225a (diff)
serialize linking of large libraries only if USE_LD is not set
This problem with large memory usage during parallel linking of several large libraries is presumably only relevant for the poorly performing BFD linker. I can barely notice any memory usage increase even with something as "old" as gold. Change-Id: I20038c98543b1b920d75d8f645c6b90afb5fb6e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133250 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'RepositoryModule_host.mk')
-rw-r--r--RepositoryModule_host.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 49118cd6259d..376f3d1404a8 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -200,9 +200,16 @@ ifeq (,$(DISABLE_DYNLOADING))
# libraries takes enormous amounts of RAM. To prevent annoying OOM situations
# etc., try to prevent linking these in parallel by adding artificial build
# order dependencies here.
+# Do this only if a linker is not explicitly set, as this should only apply
+# to the BFD linker and any decently modern linker presumably performs better.
+ifeq (,$(USE_LD))
define repositorymodule_serialize1
$(call gb_Library_get_linktarget_target,$(1)) :| $(foreach lib,$(2),$(call gb_Library_get_target,$(lib)))
endef
+else
+define repositorymodule_serialize1
+endef
+endif
define repositorymodule_serialize
$(if $(filter-out 0 1,$(words $(1))),\