Skip to content

Commit 3442865

Browse files
committed
build: Use Link Time Optimization for Qt code on Linux
See: https://www.qt.io/blog/2019/01/02/qt-applications-lto
1 parent ebce66e commit 3442865

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

depends/packages/qt.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ $(package)_config_opts_linux += -fontconfig
152152
$(package)_config_opts_linux += -no-opengl
153153
$(package)_config_opts_linux += -no-feature-vulkan
154154
$(package)_config_opts_linux += -dbus-runtime
155+
ifneq ($(LTO),)
156+
$(package)_config_opts_linux += -ltcg
157+
endif
155158
$(package)_config_opts_arm_linux += -platform linux-g++ -xplatform bitcoin-linux-g++
156159
$(package)_config_opts_i686_linux = -xplatform linux-g++-32
157160
ifneq (,$(findstring -stdlib=libc++,$($(1)_cxx)))

0 commit comments

Comments
 (0)