RepositoryModule_host.mk |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit c74b7dadd53a3821451c6bed93988eea1743f141
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Thu Apr 21 11:48:10 2022 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Thu Apr 21 14:17:58 2022 +0200

    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.st...@allotropia.de>
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>
    Tested-by: Jenkins

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))),\

Reply via email to