solenv/gbuild/platform/com_GCC_defs.mk |    6 ++----
 solenv/gbuild/platform/solaris.mk      |    3 +--
 solenv/gbuild/platform/unxgcc.mk       |    1 -
 3 files changed, 3 insertions(+), 7 deletions(-)

New commits:
commit c53a8aef805e59bbafb1943e5be49a6529645638
Author:     Luboš Luňák <[email protected]>
AuthorDate: Fri Oct 8 12:56:46 2021 +0200
Commit:     Luboš Luňák <[email protected]>
CommitDate: Mon Oct 11 08:16:02 2021 +0200

    merge LD_PLUGIN use with other LTO use
    
    It seems LD_PLUGIN predates the other --plugin usage, so make
    that one use LD_PLUGIN instead of using --plugin twice.
    
    Change-Id: I00133be18e576bc9a797853621a20dd7d5245344
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123257
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <[email protected]>

diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index a862612a5423..0243ca83961c 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -182,7 +182,7 @@ ifeq ($(ENABLE_LTO),TRUE)
 ifeq ($(COM_IS_CLANG),TRUE)
 gb_LTOFLAGS := -flto=thin
 ifeq (,$(index,iOS MACOSX,$(OS)))
-gb_LTOPLUGINFLAGS := --plugin LLVMgold.so
+gb_LTOPLUGINFLAGS := --plugin $(if $(LD_PLUGIN),$(LD_PLUGIN),LLVMgold.so)
 endif
 else
 gb_LTOFLAGS := -flto$(if $(filter-out 0,$(PARALLELISM)),=$(PARALLELISM)) 
-fuse-linker-plugin -O2
diff --git a/solenv/gbuild/platform/solaris.mk 
b/solenv/gbuild/platform/solaris.mk
index 686b082a5cf5..829e324a0047 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -144,8 +144,7 @@ endef
 define gb_LinkTarget__command_staticlink
 $(call gb_Helper_abbreviate_dirs,\
        rm -f $(1) && \
-       $(gb_AR) -rsu $(1) \
-               $(if $(LD_PLUGIN),--plugin $(LD_PLUGIN)) \
+       $(gb_AR) $(gb_LTOPLUGINFLAGS) -rsu $(1) \
                $(foreach object,$(COBJECTS),$(call 
gb_CObject_get_target,$(object))) \
                $(foreach object,$(CXXOBJECTS),$(call 
gb_CxxObject_get_target,$(object))) \
                $(foreach object,$(ASMOBJECTS),$(call 
gb_AsmObject_get_target,$(object))) \
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 4f6315faec68..21ee9458224b 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -161,7 +161,6 @@ define gb_LinkTarget__command_staticlink
 $(call gb_Helper_abbreviate_dirs,\
        rm -f $(1) && \
        $(gb_AR) $(gb_LTOPLUGINFLAGS) -rsu $(1) \
-               $(if $(LD_PLUGIN),--plugin $(LD_PLUGIN)) \
                $(foreach object,$(COBJECTS),$(call 
gb_CObject_get_target,$(object))) \
                $(foreach object,$(CXXOBJECTS),$(call 
gb_CxxObject_get_target,$(object))) \
                $(foreach object,$(ASMOBJECTS),$(call 
gb_AsmObject_get_target,$(object))) \
commit cca8c5ad553e21bd55aef93757cd31626f9beba1
Author:     Luboš Luňák <[email protected]>
AuthorDate: Fri Oct 8 12:52:54 2021 +0200
Commit:     Luboš Luňák <[email protected]>
CommitDate: Mon Oct 11 08:15:47 2021 +0200

    use ThinLTO for Clang everywhere
    
    No idea why it should be used only on Apple platforms and normal LTO
    elsewhere. ThinLTO should build faster and the result should perform
    roughly the same.
    
    Change-Id: Ie93cf0ba810ee5bb2309fcbd3548a4847587b3d4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123256
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <[email protected]>

diff --git a/solenv/gbuild/platform/com_GCC_defs.mk 
b/solenv/gbuild/platform/com_GCC_defs.mk
index da00c5a8ed9e..a862612a5423 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -180,10 +180,8 @@ gb_CFLAGS_COMMON += -std=gnu89
 
 ifeq ($(ENABLE_LTO),TRUE)
 ifeq ($(COM_IS_CLANG),TRUE)
-ifneq (,$(index,iOS MACOSX,$(OS)))
 gb_LTOFLAGS := -flto=thin
-else
-gb_LTOFLAGS := -flto
+ifeq (,$(index,iOS MACOSX,$(OS)))
 gb_LTOPLUGINFLAGS := --plugin LLVMgold.so
 endif
 else

Reply via email to