[Libreoffice-commits] core.git: solenv/gbuild
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 27 07:10:59 UTC 2020
solenv/gbuild/platform/com_GCC_defs.mk | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit bd39ec554f90badccfb26c843fd0d43237f1b622
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue May 26 15:55:04 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed May 27 09:10:26 2020 +0200
bloaty: use -ffunction-sections and --gc-sections for linking
strips out 3+ megabytes of duplicate functions (which originate in
the generated UNO header files)
Change-Id: I69ba5f478b2b062e2b05516bbaa2d18fa8312aa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94868
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 1707a7481ee6..766d53c07526 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -106,7 +106,9 @@ gb_LinkTarget_LDFLAGS += -fprofile-arcs -lgcov
gb_COMPILEROPTFLAGS := -O0
endif
-ifeq ($(DISABLE_DYNLOADING),TRUE)
+# Strip out duplicates, which happen a lot with e.g. UNO
+# functions declared in UNO header files.
+ifneq ($(OS_FOR_BUILD),MACOSX)
gb_CFLAGS_COMMON += -ffunction-sections -fdata-sections
gb_CXXFLAGS_COMMON += -ffunction-sections -fdata-sections
gb_LinkTarget_LDFLAGS += -Wl,--gc-sections
More information about the Libreoffice-commits
mailing list