aboutsummaryrefslogtreecommitdiff
path: root/depends
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-07-18 10:39:18 +0100
committerfanquake <fanquake@gmail.com>2022-07-18 10:39:24 +0100
commitd806407173926e46421ad807750a06e49afbbdbd (patch)
tree8939cddb7618c33855ca64495f934714069463e5 /depends
parentc5fa7ed409f31faed75b86cb0bb98bed151e07bd (diff)
parent3442865360b18b757aee718de585c31e28c457ce (diff)
Merge bitcoin/bitcoin#25542: build: Use Link Time Optimization for Qt code on Linux
3442865360b18b757aee718de585c31e28c457ce build: Use Link Time Optimization for Qt code on Linux (Hennadii Stepanov) ebce66e532914b433df38a0ee5a2aebcecbd7987 build: pass -fno-lto when building expat (fanquake) Pull request description: See: https://www.qt.io/blog/2019/01/02/qt-applications-lto `bitcon-qt` unstripped size: | host | master (31c6309cc60ae3fee2d3ecc2aff9576596fb98ac) | this PR, depends built with `LTO=1` | |---|:-:|:-:| | x86_64-pc-linux-gnu | 42 MB | 35 MB | | arm-linux-gnueabihf | 31 MB | 26 MB | | aarch64-linux-gnu | 41 MB | 32 MB | | powerpc64-linux-gnu | 51 MB | 41 MB | | powerpc64le-linux-gnu | 48 MB | 39 MB | | riscv64-linux-gnu | 35 MB | 29 MB | Based on the first commit from bitcoin/bitcoin#25391. Using LTO for macOS and Windows hosts has some issues which could be addressed in follow ups. x86_64 build: ![image](https://user-images.githubusercontent.com/32963518/179326902-f91853ca-23c1-4c04-9a6d-161b695f27b5.png) ACKs for top commit: fanquake: ACK 3442865360b18b757aee718de585c31e28c457ce Tree-SHA512: 03eef2568358df9336e24d6c4e12f28b89d649076fb74e7e5303d61e52865c2360c5345a4fb2b1e4bdfdae194f273fc27a5f67e6cf797ed01a154f3da9117247
Diffstat (limited to 'depends')
-rw-r--r--depends/packages/expat.mk1
-rw-r--r--depends/packages/qt.mk3
2 files changed, 4 insertions, 0 deletions
diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk
index 50791ebc6e..349319138e 100644
--- a/depends/packages/expat.mk
+++ b/depends/packages/expat.mk
@@ -9,6 +9,7 @@ define $(package)_set_vars
$(package)_config_opts += --disable-dependency-tracking --enable-option-checking
$(package)_config_opts += --without-xmlwf
$(package)_config_opts_linux=--with-pic
+ $(package)_cflags += -fno-lto
endef
define $(package)_config_cmds
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index 7e268fe9a5..d46ca9ff9c 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -152,6 +152,9 @@ $(package)_config_opts_linux += -fontconfig
$(package)_config_opts_linux += -no-opengl
$(package)_config_opts_linux += -no-feature-vulkan
$(package)_config_opts_linux += -dbus-runtime
+ifneq ($(LTO),)
+$(package)_config_opts_linux += -ltcg
+endif
$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
$(package)_config_opts_i686_linux = -xplatform linux-g++-32
ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx)))