-
Notifications
You must be signed in to change notification settings - Fork 36.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guix: Use LTO to build releases #25391
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
32d3049
to
c6b8b4d
Compare
Concept ACK. This would be great. |
545abfa
to
076aa5e
Compare
See #25542. |
Tested 076aa5e on Ubuntu 22.04:
UPDATE: |
I'm not sure what's causing that (maybe a not-completely-clean build dir, and mix of compiled objects), but I don't have any issues with this branch, following the same steps, using Ubuntu 22.04 and |
… code on Linux 3442865 build: Use Link Time Optimization for Qt code on Linux (Hennadii Stepanov) ebce66e 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 (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 bitcoin/bitcoin#25391. Using LTO for macOS and Windows hosts has some issues which could be addressed in follow ups. x86_64 build:  ACKs for top commit: fanquake: ACK 3442865 Tree-SHA512: 03eef2568358df9336e24d6c4e12f28b89d649076fb74e7e5303d61e52865c2360c5345a4fb2b1e4bdfdae194f273fc27a5f67e6cf797ed01a154f3da9117247
Rebased for #25542. All binaries for our Linux HOSTS now build. |
…th GCC) 658685a depends: default to using GCC tool wrappers (with GCC) (fanquake) 6fdc13c build: Fix autoconf variable names for tools found by `AC_PATH_TOOL` (Hennadii Stepanov) Pull request description: This improves support for LTO by using gcc wrappers for `ar`, `nm`, `ranlib`, that correctly setup plugin arguments for LTO, when using GCC. Other HOSTS are using clang. Portion of #25391. Guix Build (x86_64): ```bash ``` Guix Build (arm64): ```bash ``` ACKs for top commit: dongcarl: Code Review ACK 658685a hebasto: ACK 658685a jarolrod: ACK 658685a Tree-SHA512: 28d6127c118f74336c97e2523117f8a0d11b32cd565124cd4052baeb7cc53e71909d3037cb080d996ae4e3ce600326fced37ee36adcc53d839ba7dd7974ebcd2
4133c81 guix: use gcc tool wrappers (fanquake) Pull request description: This way, correct `--plugin` arguments are passed through. This is a prerequisite for LTO (see bitcoin#25391). Split out, to try move things along, as this change is isolated, and should be straight-forward. ACKs for top commit: TheCharlatan: ACK [4133c81](bitcoin@4133c81) hebasto: ACK 4133c81 Tree-SHA512: 4311a72a613cf027bd4490caa29604c985ed455589acd972285f13cbdf4806d2184a4dc6f20cb6f47c3fa751d58bfd0bacc257b87d4a804bf5ecf5b240e4a757
9907c82
to
739826f
Compare
Also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113359 (in combination with #29881) Would be nice to extend the motivation (pull request description) a bit about the benefits and risks. |
🐙 This pull request conflicts with the target branch and needs rebase. |
Thanks. Drafted for the moment, but going to come back here soon with much more information. |
```bash bitcoind: export of symbol in6addr_any not allowed! bitcoind: failed EXPORTED_SYMBOLS test/test_bitcoin: export of symbol in6addr_any not allowed! test/test_bitcoin: failed EXPORTED_SYMBOLS ``` Also new exports for bitcoin-qt.
Going to come back to this after static builds. |
f0cebbd qt: enable -ltcg for windows HOST (fanquake) Pull request description: Patch around multiple definition issues in Qt, and enable `-ltcg` when using `LTO=1`. Split from bitcoin#25391. ACKs for top commit: hebasto: ACK f0cebbd Tree-SHA512: 2d6e34779f360bf6dfea4f70fc9004a16e95da79716fcb3046afbf2b01317b7e16965cb51b967b7b5fb64549306c5f48cf59082884289c52016bc1e86949e062
f0cebbd qt: enable -ltcg for windows HOST (fanquake) Pull request description: Patch around multiple definition issues in Qt, and enable `-ltcg` when using `LTO=1`. Split from bitcoin#25391. ACKs for top commit: hebasto: ACK f0cebbd Tree-SHA512: 2d6e34779f360bf6dfea4f70fc9004a16e95da79716fcb3046afbf2b01317b7e16965cb51b967b7b5fb64549306c5f48cf59082884289c52016bc1e86949e062
f0cebbd qt: enable -ltcg for windows HOST (fanquake) Pull request description: Patch around multiple definition issues in Qt, and enable `-ltcg` when using `LTO=1`. Split from bitcoin#25391. ACKs for top commit: hebasto: ACK f0cebbd Tree-SHA512: 2d6e34779f360bf6dfea4f70fc9004a16e95da79716fcb3046afbf2b01317b7e16965cb51b967b7b5fb64549306c5f48cf59082884289c52016bc1e86949e062
Changes required to use LTO in Guix (release) builds.