Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Jul 5, 2022

See: https://www.qt.io/blog/2019/01/02/qt-applications-lto

bitcon-qt unstripped size:

host master (31c6309) 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 #25391.

Using LTO for macOS and Windows hosts has some issues which could be addressed in follow ups.

x86_64 build:
image

@fanquake
Copy link
Member

fanquake commented Jul 5, 2022

Last I checked this basically didn't work for anything other than x86_64 Linux, but if that's no-longer the case, that could be handy.

@kristapsk
Copy link
Contributor

Last I checked this basically didn't work for anything other than x86_64 Linux, but if that's no-longer the case, that could be handy.

I tthink this could be useful even if it works only for x86_64 Linux.

@hebasto hebasto changed the title build: Use Link Time Optimization for Qt code build: Use Link Time Optimization for Qt code on Linux Jul 14, 2022
@hebasto hebasto marked this pull request as ready for review July 14, 2022 09:24
@hebasto hebasto requested a review from fanquake July 14, 2022 16:39
Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3442865

I've tested this branch + #25391 + a change to allow for additional symbol exports for bitcoin-qt, and the Guix + LTO Linux builds are working.
I have not tested or run bitcoin-qt.

@fanquake fanquake merged commit d806407 into bitcoin:master Jul 18, 2022
@hebasto hebasto deleted the 220705-ltcg branch July 18, 2022 09:56
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jul 18, 2022
@bitcoin bitcoin locked and limited conversation to collaborators Jul 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants