solenv/gbuild/platform/com_GCC_defs.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 899434244fb8b632159a82c1f61262a15058708c Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> AuthorDate: Wed Oct 27 20:19:44 2021 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Thu Oct 28 12:07:06 2021 +0200 -flto: only use firstword of PARALLELISM jenkins agents use PARALLELISM with additional load limit, e.g. PARALLELISM="16 -l 24" causing the linker to complain about not finding -l24 when lto is enabled. So only use the first element/the number of jobs to use and omit the load limit here. Change-Id: Ie3e2bdbde1b89d9371d1d9b9e426f42a91d2eca8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124288 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 2ca057c4f196..de3359f5dbd2 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -185,7 +185,8 @@ ifeq (,$(index,iOS MACOSX,$(OS))) gb_LTOPLUGINFLAGS := --plugin $(if $(LD_PLUGIN),$(LD_PLUGIN),LLVMgold.so) endif else -gb_LTOFLAGS := -flto=$(if $(filter-out 0,$(PARALLELISM)),$(PARALLELISM),auto) -fuse-linker-plugin -O2 +# use first element of the PARALLELISM, to allow values like "12 -l 14" to specify load limits +gb_LTOFLAGS := -flto=$(if $(filter-out 0,$(PARALLELISM)),$(firstword $(PARALLELISM)),auto) -fuse-linker-plugin -O2 # clang does not support -flto=<number> gb_CLANG_LTOFLAGS := -flto=thin endif