From c53a8aef805e59bbafb1943e5be49a6529645638 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Fri, 8 Oct 2021 12:56:46 +0200 Subject: merge LD_PLUGIN use with other LTO use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- solenv/gbuild/platform/com_GCC_defs.mk | 2 +- solenv/gbuild/platform/solaris.mk | 3 +-- solenv/gbuild/platform/unxgcc.mk | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) (limited to 'solenv/gbuild') 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))) \ -- cgit