summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-08-24 14:23:13 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-08-24 14:23:43 +0100
commit87610049f8a1690598b84b0bf984cfa487ce1074 (patch)
tree3a34ad0da2ce32184024f86a2a87926496f1a200
parent75fac9839793f73c9833489f1d70bf4136881cbf (diff)
misc cleanups of mergelibs functionality
-rw-r--r--Module_tail_build.mk2
-rwxr-xr-xconfigure.in5
-rw-r--r--scp2/source/ooo/file_library_ooo.scp2
-rw-r--r--scp2/source/ooo/makefile.mk4
-rw-r--r--solenv/gbuild/LinkTarget.mk8
5 files changed, 15 insertions, 6 deletions
diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 8408cd875544..e5c010b12f06 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -51,7 +51,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
writerperfect \
))
-ifeq ($(MERGELIBS),YES)
+ifeq ($(MERGELIBS),TRUE)
$(eval $(call gb_Module_add_targets,tail_end,\
Library_merged \
))
diff --git a/configure.in b/configure.in
index ad5f63f8101f..77e7bc4a2015 100755
--- a/configure.in
+++ b/configure.in
@@ -9072,8 +9072,9 @@ AC_SUBST(BUILD_NCPUS)
# Creating bigger shared library to link against
# ===================================================================
AC_MSG_CHECKING([whether to create a big library for better performance])
-if test "$enable_mergelibs" != "no"; then
- MERGELIBS="YES"
+MERGELIBS=
+if test "$enable_mergelibs" = "yes"; then
+ MERGELIBS="TRUE"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 975ec1598dbd..b210026f84d4 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -1292,7 +1292,9 @@ STD_LIB_FILE( gid_File_Lib_Swui, swui)
STD_LIB_FILE( gid_File_Lib_Msword, msword )
+#ifdef MERGELIBS
STD_LIB_FILE( gid_File_Lib_Merged, merged )
+#endif
#if ! defined UNX
File gid_File_Lib_Sysdtrans
diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk
index 0e988b2fa570..7d6aba50c4cd 100644
--- a/scp2/source/ooo/makefile.mk
+++ b/scp2/source/ooo/makefile.mk
@@ -72,6 +72,10 @@ SCPDEFS+=-DENABLE_GTK3
.ENDIF
.ENDIF # "$(GUI)"=="UNX"
+.IF "$(MERGELIBS)" == "TRUE"
+SCPDEFS+=-DMERGELIBS
+.ENDIF
+
.IF "$(ENABLE_KDE)" != ""
SCPDEFS+=-DENABLE_KDE
.ENDIF
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 325a37d0ee5b..69683c58f74b 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -44,8 +44,10 @@ CXXFLAGS ?= $(gb_COMPILEROPTFLAGS)
OBJCXXFLAGS ?= $(gb_COMPILEROPTFLAGS)
endif
-# if enabled we can create one library instead of more smaller
-ifeq ($(MERGELIBS),YES)
+# if enabled we link all of these libraries into one larger, merged library
+# for which we can do a lot more optimisation, and which is faster to read
+# from disk.
+ifeq ($(MERGELIBS),TRUE)
# list of libraries which are always loaded, thus we can merge them into one
# they have to be from tail_build, so we could link against merged library
gb_CORE_LIBS := \
@@ -733,7 +735,7 @@ $$(eval $$(call gb_Output_info,currently known libraries are: $(sort $(gb_Librar
$$(eval $$(call gb_Output_error,Cannot link against library/libraries $$(filter-out $(gb_Library_KNOWNLIBS),$(2)). Libraries must be registered in Repository.mk))
endif
-ifeq ($(MERGELIBS),YES)
+ifeq ($(MERGELIBS),TRUE)
gb_LINKED_LIBS := $(if $(filter $(gb_CORE_LIBS),$(2)),merged $(filter-out $(gb_CORE_LIBS),$(2)),$(2))
else
gb_LINKED_LIBS := $(2)