forked from pool/libreoffice
- Enable LTO on libreoffice, 16% smaller binaries, less memory used: * 0001-Use-jobserver-on-LTO-from-make.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=629
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From c87570aad9f4675f2bba9233f12f53d9fa287c51 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
|
|
Date: Fri, 6 Apr 2018 16:33:39 +0200
|
|
Subject: [PATCH] Use jobserver on LTO from make
|
|
|
|
This should avoid executing PARALELISM threads for each linker call but
|
|
rather limits it to the basic jobs given to make.
|
|
|
|
Previous behaviour could be 8 make threads, each spawning 8 LTO threads,
|
|
while here it should append its jobs to make and leave it to the make
|
|
itself to distribute.
|
|
|
|
Change-Id: Ib22bd21dfae60eb0eb8ac7b9c1c277b152378294
|
|
---
|
|
solenv/gbuild/platform/com_GCC_defs.mk | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
|
|
index ac3cbc366cf7..4180144bdec4 100644
|
|
--- a/solenv/gbuild/platform/com_GCC_defs.mk
|
|
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
|
|
@@ -158,7 +158,7 @@ ifeq ($(COM_IS_CLANG),TRUE)
|
|
gb_LTOFLAGS := -flto
|
|
gb_LTOPLUGINFLAGS := --plugin LLVMgold.so
|
|
else
|
|
-gb_LTOFLAGS := -flto=$(PARALLELISM) -fuse-linker-plugin -O2
|
|
+gb_LTOFLAGS := -flto=jobserver -fuse-linker-plugin -O2
|
|
endif
|
|
endif
|
|
|
|
--
|
|
2.16.3
|
|
|