[Libreoffice-commits] core.git: solenv/gbuild

Christian Lohmaier lohmaier+LibreOffice at googlemail.com
Sat Sep 30 06:19:23 UTC 2017


 solenv/gbuild/platform/com_MSC_class.mk |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 499194508c8cf91fbbc21f882bcf4ace77e19eaa
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date:   Fri Sep 29 21:04:36 2017 +0200

    allow linking mergedlib on win by removing duplicate libs from commandline
    
    adding advapi 62 times, icuuc 24 times and libxml2 18 times (and others
    multiple times as well) is too much for cygwin to handle and breaks the
    build when trying to link mergedlo.dll with the not-very telling
    "/usr/bin/sh: -c: line 1: syntax error: unexpected end of file"
    (especially since the latter are added with $W/UnpackedTarball/whatever)
    
    uses the sideeffect of make's sort to remove the duplicates
    
    Change-Id: I9e92aafa0df9518520793a5827fb6cc157538f4b
    Reviewed-on: https://gerrit.libreoffice.org/42953
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index cd1bd0408ef0..b6f2c38d1cb5 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -148,6 +148,8 @@ else
 MSC_SUBSYSTEM_VERSION=$(COMMA)5.01
 endif
 
+# the sort on the libraries is used to filter out duplicates to keep commanline
+# length in check - otherwise the dupes easily hit the limit when linking mergedlib
 define gb_LinkTarget__command
 $(call gb_Output_announce,$(2),$(true),LNK,4)
 $(call gb_Helper_abbreviate_dirs,\
@@ -176,10 +178,10 @@ $(call gb_Helper_abbreviate_dirs,\
 		    $(if $(filter 80 81 10,$(WINDOWS_SDK_VERSION)),-LIBPATH:$(WINDOWS_SDK_HOME)/lib/$(WINDOWS_SDK_LIB_SUBDIR)/um/x64)) \
 		$(T_LDFLAGS) \
 		@$${RESPONSEFILE} \
-		$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_ilibfilename,$(lib))) \
-		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_filename,$(lib))) \
+		$(foreach lib,$(sort $(LINKED_LIBS)),$(call gb_Library_get_ilibfilename,$(lib))) \
+		$(foreach lib,$(sort $(LINKED_STATIC_LIBS)),$(call gb_StaticLibrary_get_filename,$(lib))) \
 		$(if $(filter-out StaticLibrary,$(TARGETTYPE)),\
-			$(T_LIBS) user32.lib \
+			$(sort $(T_LIBS)) user32.lib \
 			-manifestfile:$(WORKDIR)/LinkTarget/$(2).manifest \
 			-pdb:$(call gb_LinkTarget__get_pdb_filename,$(WORKDIR)/LinkTarget/$(2))) \
 		$(if $(ILIBTARGET),-out:$(1) -implib:$(ILIBTARGET),-out:$(1)); RC=$$?; rm $${RESPONSEFILE} \


More information about the Libreoffice-commits mailing list