[Libreoffice-commits] .: Module_tail_build.mk
Michael Stahl
mst at kemper.freedesktop.org
Tue May 15 10:38:57 PDT 2012
Module_tail_build.mk | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit 6d1cef5d97aa6695db0874b4da30b952fb1c53ae
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue May 15 19:34:46 2012 +0200
try to serialize linking in tail_build a little
To hopefully reduce likelyhood of OOM related problems, especially
with debug/symbols enabled, prevent linking 10 biggest libraries in
parallel.
diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index cb000ca..cda607c 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -106,4 +106,22 @@ $(eval $(call gb_Module_add_targets,tail_end,\
))
endif
+# Especially when building everything with symbols, the linking of the largest
+# 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.
+define tailbuild_serialize1
+$(call gb_LinkTarget_get_target,$(call gb_Library_get_linktargetname,$(1))) \
+ :| $(foreach lib,$(2),$(call gb_Library_get_target,$(lib)))
+endef
+
+define tailbuild_serialize
+$(if $(filter-out 0 1,$(words $(1))),\
+$(call tailbuild_serialize1,$(firstword $(1)),$(wordlist 2,$(words $(1)),$(1))))
+$(if $(strip $(1)),\
+$(call tailbuild_serialize,$(wordlist 2,$(words $(1)),$(1))))
+endef
+
+$(eval $(call tailbuild_serialize,scfilt sc sw sd dbu ooxml oox svxcore vcl xo))
+
# vim: set noet sw=4 ts=4:
More information about the Libreoffice-commits
mailing list