--icf=safe Enable safe identical code folding.
This reduces the size of bitcoind by ~0.5mb, and bitcoin-qt by 1.3mb (aarch64-apple-darwin).
This option exists for lld, which is why it's only added for darwin builds.
--icf=safe Enable safe identical code folding.
This reduces the size of bitcoind by ~0.5mb, and bitcoin-qt by 1.3mb (aarch64-apple-darwin).
This option exists for lld, which is why it's only added for darwin builds.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35197.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | davidgumberg |
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
<!--85328a0da195eb286784d51f73fa0af9-->
🚧 At least one of the CI tasks failed.
<sub>Task i686, no IPC: https://github.com/bitcoin/bitcoin/actions/runs/25275669000/job/74105140405</sub>
<sub>LLM reason (✨ experimental): CI failed because the sock_tests test in the “Bitcoin Core Test Suite” failed (ctest reported 1 failing test out of 296).</sub>
<details><summary>Hints</summary>
Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:
Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.
A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.
An intermittent issue.
Leave a comment here, if you need help tracking down a confusing failure.
</details>
> --icf=safe
> Enable safe identical code folding.
This reduces the size of bitcoind by ~0.5mb, and bitcoin-qt by 1.3mb
(aarch64-apple-darwin).
ACK https://github.com/bitcoin/bitcoin/commit/aa3bbe2ea218c9645fe43d0df3aa2cbdf30a99cc
Seems reasonable to me, the only harm is this will introduce ambiguity in some cases when debugging/profiling release binaries[^1], but that seems fine to me, and it's a nice win in binary sizes, might be worth highlighting with a release note.
All sizes in bytes:
| Binary | Parent (aa3bbe2ea218^) | Branch (aa3bbe2ea218) | Size reduced | % of original size reduced |
|---|---|---|---|---|
| bitcoin | 209512 | 193040 | 16472 | -7.86% |
| bitcoin-cli | 3167072 | 2540328 | 626744 | -19.79% |
| bitcoind | 12551448 | 11940744 | 610704 | -4.87% |
| bitcoin-qt | 32420944 | 31097424 | 1323520 | -4.08% |
| bitcoin-tx | 2393064 | 2327088 | 65976 | -2.76% |
| bitcoin-util | 372088 | 355576 | 16512 | -4.44% |
| bitcoin-wallet | 4163212 | 4014652 | 148560 | -3.57% |
| Total | 55277340 | 52468852 | 2808488 | -5.08% |
| Binary | Parent (aa3bbe2ea218^) | Branch (aa3bbe2ea218) | Size reduced | % of original size reduced |
|---|---|---|---|---|
| bitcoin | 177056 | 164688 | 12368 | -6.99% |
| bitcoin-cli | 3273828 | 2688284 | 585544 | -17.89% |
| bitcoind | 13704300 | 13204764 | 499536 | -3.65% |
| bitcoin-qt | 35216384 | 34037176 | 1179208 | -3.35% |
| bitcoin-tx | 2663816 | 2606144 | 57672 | -2.17% |
| bitcoin-util | 478888 | 458296 | 20592 | -4.30% |
| bitcoin-wallet | 4528568 | 4408920 | 119648 | -2.64% |
| Total | 60042840 | 57568272 | 2474568 | -4.12% |
<details>
<summary>
This branch:
$ git checkout --detach aa3bbe2ea218c9645fe43d0df3aa2cbdf30a99cc
HEAD is now at aa3bbe2ea2 guix: add -Wl,--icf=safe to darwin build
$ ./contrib/guix/guix-build
$ source contrib/shell/git-utils.bash && uname -m && find guix-build-$(git_head_version)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
x86_64
55d2df2755f4533cb38d8cb13a02d5d3ff9f07416fb97597fc81679f610159ba guix-build-aa3bbe2ea218/output/aarch64-linux-gnu/SHA256SUMS.part
8d8861c3ffb2f841e4a6cd4c018d0f656f025fbc976be266f7532302bba26e36 guix-build-aa3bbe2ea218/output/aarch64-linux-gnu/bitcoin-aa3bbe2ea218-aarch64-linux-gnu-debug.tar.gz
fe2cd08a58db5da330e70eca9bd2a29f6922686f7cab9c36599a683da81a3c47 guix-build-aa3bbe2ea218/output/aarch64-linux-gnu/bitcoin-aa3bbe2ea218-aarch64-linux-gnu.tar.gz
89534395b221b0be8d076a34e147285b30636fe2fe4685df0c2ac5dd6244c8ae guix-build-aa3bbe2ea218/output/arm-linux-gnueabihf/SHA256SUMS.part
9fa95a8d0990d270965dde7ab6e4465221ef1693ee60a6c6ba3b02fe3602e058 guix-build-aa3bbe2ea218/output/arm-linux-gnueabihf/bitcoin-aa3bbe2ea218-arm-linux-gnueabihf-debug.tar.gz
0a58a126e4fc1150d76ec4ca9cd1fe864ccdaec1536055adb977c221801f2ef0 guix-build-aa3bbe2ea218/output/arm-linux-gnueabihf/bitcoin-aa3bbe2ea218-arm-linux-gnueabihf.tar.gz
5a5bb6f80eb68eff565767d039d523555e715c620705c3329d4e240073a84799 guix-build-aa3bbe2ea218/output/arm64-apple-darwin/SHA256SUMS.part
753b9cccd5a4c20f4da34183533a385c52454facf4cb30c11956c1c8df4023eb guix-build-aa3bbe2ea218/output/arm64-apple-darwin/bitcoin-aa3bbe2ea218-arm64-apple-darwin-codesigning.tar.gz
12b397bb76d18d5bd9cd21d91c78d64c58dc32b20823953f5f6909e40f26ef5b guix-build-aa3bbe2ea218/output/arm64-apple-darwin/bitcoin-aa3bbe2ea218-arm64-apple-darwin-unsigned.tar.gz
072d890fe500e86d59441778e8d1cc2b4a5a3bb5e1fa1fcaba443f713a2e3bb2 guix-build-aa3bbe2ea218/output/arm64-apple-darwin/bitcoin-aa3bbe2ea218-arm64-apple-darwin-unsigned.zip
16c8ec7d7f16dfa24c1dd2b1f72d02207be3769e8b7ae57e31fd3285a22bf9d0 guix-build-aa3bbe2ea218/output/dist-archive/bitcoin-aa3bbe2ea218.tar.gz
a321e30a01ee92115eccd85e2dfc04a0853939a7396854e93d530f9bc7dd5feb guix-build-aa3bbe2ea218/output/powerpc64-linux-gnu/SHA256SUMS.part
fcc07d881190898c1b5ec62d128ea1c920ab5b93141b27f5cbc4bbffdb955ae2 guix-build-aa3bbe2ea218/output/powerpc64-linux-gnu/bitcoin-aa3bbe2ea218-powerpc64-linux-gnu-debug.tar.gz
d294b23f21efcb42b80cca6517a8ade2f551ff91cba9a1087551ebafefc5b579 guix-build-aa3bbe2ea218/output/powerpc64-linux-gnu/bitcoin-aa3bbe2ea218-powerpc64-linux-gnu.tar.gz
7d767fd902ce82b913c232079125fb39e50a7fd3ea8716de53cd5e43f9097135 guix-build-aa3bbe2ea218/output/riscv64-linux-gnu/SHA256SUMS.part
d6d9e2f7857e6ee07a3de4eb62f389210ec675a96f79da32870f49d4426a5800 guix-build-aa3bbe2ea218/output/riscv64-linux-gnu/bitcoin-aa3bbe2ea218-riscv64-linux-gnu-debug.tar.gz
645437534011d3379e78ea2e725eb981c9239a54b2074c4dc475d666673e61fc guix-build-aa3bbe2ea218/output/riscv64-linux-gnu/bitcoin-aa3bbe2ea218-riscv64-linux-gnu.tar.gz
96bcf9374a0bac414c93ee7b10562dafee4b1ab8e6e26c70455de9ab895d4699 guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/SHA256SUMS.part
a9b28e8b47c4a4763d884b35bda7d762baea62012b8a84d140052de1419fec9f guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/bitcoin-aa3bbe2ea218-x86_64-apple-darwin-codesigning.tar.gz
99a3c91cfb265ee54b92994a756f02da3a17c470b78ea449283b7ae331d80e0d guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/bitcoin-aa3bbe2ea218-x86_64-apple-darwin-unsigned.tar.gz
b6378480d9340b3ea7359fd36a1e5d2596bd61b4f55af2c35bb66946aa8b9ea5 guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/bitcoin-aa3bbe2ea218-x86_64-apple-darwin-unsigned.zip
87d286a7d7a1a9d3314bdb119459c0929f8bd07a0b1057f142ef56de0ff03173 guix-build-aa3bbe2ea218/output/x86_64-linux-gnu/SHA256SUMS.part
6bfec675c208926dc3a724b14a6243a04775973f756c28c0e6381e98b31c990b guix-build-aa3bbe2ea218/output/x86_64-linux-gnu/bitcoin-aa3bbe2ea218-x86_64-linux-gnu-debug.tar.gz
0deba9d8d6f822a46e0402bd4dd45ca1aaec3b2beda968078e9f80c8f1ed9fb5 guix-build-aa3bbe2ea218/output/x86_64-linux-gnu/bitcoin-aa3bbe2ea218-x86_64-linux-gnu.tar.gz
501de61ed069dc2cb870f6b24233add5cf615b590163a3147557d89f9a8f2c98 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/SHA256SUMS.part
64613dafb19a609574f3c2357aa5f7f8c6e596052a28d5b75fd1cb99229a82b2 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-codesigning.tar.gz
b21b5f257847361ea46236eadc46f2fba5203ce3ce9404bcaa8b0784cdd6395d guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-debug.zip
85f42938bc43eae94561b8b0ad929256b10015883538abc0a4c72568d38dbda0 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-setup-unsigned.exe
d1cc3f18e7fbd064e593b8a15548bee9dc23a5d2e00ad1eaf7629f3780988497 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-unsigned.zip
Parent of this branch:
$ git checkout --detach aa3bbe2ea218c9645fe43d0df3aa2cbdf30a99cc^
Previous HEAD position was aa3bbe2ea2 guix: add -Wl,--icf=safe to darwin build
HEAD is now at ccbd00ab87 Merge bitcoin/bitcoin#35152: doc: clarify local IWYU workflow and pragmas
x86_64
$ ./contrib/guix/guix-build
$ source contrib/shell/git-utils.bash && uname -m && find guix-build-$(git_head_version)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
x86_64
6f01954a6da43e5030fb657bef9205e4a2e0b8570118057d1ef462945667c1ff guix-build-ccbd00ab87c0/output/aarch64-linux-gnu/SHA256SUMS.part
c1f705dbfa1a7a0448520e4b33beed49c3d7bc5c8aa0260fb3d1ea0e9fa6b738 guix-build-ccbd00ab87c0/output/aarch64-linux-gnu/bitcoin-ccbd00ab87c0-aarch64-linux-gnu-debug.tar.gz
86f8807beb480ad9e498e8f3f188da2691043f57eacc13b938d820bc2104a4f5 guix-build-ccbd00ab87c0/output/aarch64-linux-gnu/bitcoin-ccbd00ab87c0-aarch64-linux-gnu.tar.gz
e593543795635ad4abe6457cf4a644f64513bdf2353b86c91bfb42700ea645ab guix-build-ccbd00ab87c0/output/arm-linux-gnueabihf/SHA256SUMS.part
c9490fbd2d3257e3ac5e68952a1b285c41215e8cc9854bd5fe109a179f660fc6 guix-build-ccbd00ab87c0/output/arm-linux-gnueabihf/bitcoin-ccbd00ab87c0-arm-linux-gnueabihf-debug.tar.gz
33c048240c8e39e997c99f5f1ad65ffadcfa87a27efa4d8cc31480c52df0a31e guix-build-ccbd00ab87c0/output/arm-linux-gnueabihf/bitcoin-ccbd00ab87c0-arm-linux-gnueabihf.tar.gz
836c5266792a1af4bbbd41cbd64e6e39cbb5ae07f24bddc4361aec865e93edf0 guix-build-ccbd00ab87c0/output/arm64-apple-darwin/SHA256SUMS.part
35037e8539e06b0295a500738972adfd51ce19714735c27a60f9e9152a117458 guix-build-ccbd00ab87c0/output/arm64-apple-darwin/bitcoin-ccbd00ab87c0-arm64-apple-darwin-codesigning.tar.gz
f0e207e846478dbac5369c446968a845095d0a446279d12fc0ee12b1c122bc92 guix-build-ccbd00ab87c0/output/arm64-apple-darwin/bitcoin-ccbd00ab87c0-arm64-apple-darwin-unsigned.tar.gz
6a1c2a10d64be5e8ebafb95ab4bd6fd660ff799e179f1bf4580fa5ac12235382 guix-build-ccbd00ab87c0/output/arm64-apple-darwin/bitcoin-ccbd00ab87c0-arm64-apple-darwin-unsigned.zip
6970241efc463e6d6c381552d0441371ccacf8ce2ff33d8e02d45d8cc8c06bdb guix-build-ccbd00ab87c0/output/dist-archive/bitcoin-ccbd00ab87c0.tar.gz
566ea369d7bce1181312dfb59786e18eaa71b926d90eea4dd71fbdf39f515954 guix-build-ccbd00ab87c0/output/powerpc64-linux-gnu/SHA256SUMS.part
f5abb3102db6f4b3190401fa53ebe9d7ce5ee7cc77d287f2c2427361255d4f2d guix-build-ccbd00ab87c0/output/powerpc64-linux-gnu/bitcoin-ccbd00ab87c0-powerpc64-linux-gnu-debug.tar.gz
083e483c8acacf5917c562482c1542ade311694a0d55242ac741362e47efc3c2 guix-build-ccbd00ab87c0/output/powerpc64-linux-gnu/bitcoin-ccbd00ab87c0-powerpc64-linux-gnu.tar.gz
f60d0fcab94d8a31bf3425b826ce846288c3dd67bc00cd9786ee4422c8e325f0 guix-build-ccbd00ab87c0/output/riscv64-linux-gnu/SHA256SUMS.part
81dc5307effbbc1bae53a716c479fee4ad17e7509a1104c6f600007409c41f58 guix-build-ccbd00ab87c0/output/riscv64-linux-gnu/bitcoin-ccbd00ab87c0-riscv64-linux-gnu-debug.tar.gz
418bbed5862d9580ab883c4680de72b3baff174698e2ddd70401137d47a73286 guix-build-ccbd00ab87c0/output/riscv64-linux-gnu/bitcoin-ccbd00ab87c0-riscv64-linux-gnu.tar.gz
3d7d4ef5f6e5249a7dca655d876fda778a5db8da93db2151841c2110f93fbfb1 guix-build-ccbd00ab87c0/output/x86_64-apple-darwin/SHA256SUMS.part
7b6fafd0fff00dde6c20472d303af8e855186ee800733d137e1d10cd26fca320 guix-build-ccbd00ab87c0/output/x86_64-apple-darwin/bitcoin-ccbd00ab87c0-x86_64-apple-darwin-codesigning.tar.gz
3833fcb1f92a47a4dc8aca6d78d2e7bdb6a397add6cb2a915261337e096b3e9a guix-build-ccbd00ab87c0/output/x86_64-apple-darwin/bitcoin-ccbd00ab87c0-x86_64-apple-darwin-unsigned.tar.gz
dd5387f86e2ef96bbd4fd7df123e1db1c682a86de2c74df6b4db576608f0d920 guix-build-ccbd00ab87c0/output/x86_64-apple-darwin/bitcoin-ccbd00ab87c0-x86_64-apple-darwin-unsigned.zip
230942ba6fcf51284ea0c3a2938c99941468889608deac3dc244bf5ee66109d4 guix-build-ccbd00ab87c0/output/x86_64-linux-gnu/SHA256SUMS.part
e742b6cf36cc3b67fcc21ad81595a9af5d92bff9b42422ee1a25fc687300360f guix-build-ccbd00ab87c0/output/x86_64-linux-gnu/bitcoin-ccbd00ab87c0-x86_64-linux-gnu-debug.tar.gz
3d464ea0075b1a4f6f636142bae079913c350e38554d37dab2c27674ba3db40f guix-build-ccbd00ab87c0/output/x86_64-linux-gnu/bitcoin-ccbd00ab87c0-x86_64-linux-gnu.tar.gz
6abf1ed4ac46caaeb195bb138bc2464cdfb75dc87a71dc4bb71cb8ce6139cf67 guix-build-ccbd00ab87c0/output/x86_64-w64-mingw32/SHA256SUMS.part
f6c5969dc830a5916b5a166096d9374f787534da7c1026d6060032effc5df9c3 guix-build-ccbd00ab87c0/output/x86_64-w64-mingw32/bitcoin-ccbd00ab87c0-win64-codesigning.tar.gz
eebc0a0a58585056fba7b3d1aee3fed231ba2de7acc191a88867b2f5643e8de9 guix-build-ccbd00ab87c0/output/x86_64-w64-mingw32/bitcoin-ccbd00ab87c0-win64-debug.zip
a9c0578c04efb43dca5b8206649e8d25ed7ea3da5386890df1d1563acdf1105f guix-build-ccbd00ab87c0/output/x86_64-w64-mingw32/bitcoin-ccbd00ab87c0-win64-setup-unsigned.exe
c3f147cb64e7c5be56749ff764620b00356180ed372ca4f696619fcf4be99ce6 guix-build-ccbd00ab87c0/output/x86_64-w64-mingw32/bitcoin-ccbd00ab87c0-win64-unsigned.zip
</details>
[^1]: From the Safe ICF paper (https://static.googleusercontent.com/media/research.google.com/en/us/pubs/archive/36912.pdf) : "profiling and debugging binaries with merged functions can be confusing, as the PC values of merged functions cannot be always disambiguated to point to the correct function." The paper proposes a mitigation but my (limited) understanding is that this is not implemented anywhere.
Guix build (aarch64):
55d2df2755f4533cb38d8cb13a02d5d3ff9f07416fb97597fc81679f610159ba guix-build-aa3bbe2ea218/output/aarch64-linux-gnu/SHA256SUMS.part
8d8861c3ffb2f841e4a6cd4c018d0f656f025fbc976be266f7532302bba26e36 guix-build-aa3bbe2ea218/output/aarch64-linux-gnu/bitcoin-aa3bbe2ea218-aarch64-linux-gnu-debug.tar.gz
fe2cd08a58db5da330e70eca9bd2a29f6922686f7cab9c36599a683da81a3c47 guix-build-aa3bbe2ea218/output/aarch64-linux-gnu/bitcoin-aa3bbe2ea218-aarch64-linux-gnu.tar.gz
89534395b221b0be8d076a34e147285b30636fe2fe4685df0c2ac5dd6244c8ae guix-build-aa3bbe2ea218/output/arm-linux-gnueabihf/SHA256SUMS.part
9fa95a8d0990d270965dde7ab6e4465221ef1693ee60a6c6ba3b02fe3602e058 guix-build-aa3bbe2ea218/output/arm-linux-gnueabihf/bitcoin-aa3bbe2ea218-arm-linux-gnueabihf-debug.tar.gz
0a58a126e4fc1150d76ec4ca9cd1fe864ccdaec1536055adb977c221801f2ef0 guix-build-aa3bbe2ea218/output/arm-linux-gnueabihf/bitcoin-aa3bbe2ea218-arm-linux-gnueabihf.tar.gz
5a5bb6f80eb68eff565767d039d523555e715c620705c3329d4e240073a84799 guix-build-aa3bbe2ea218/output/arm64-apple-darwin/SHA256SUMS.part
753b9cccd5a4c20f4da34183533a385c52454facf4cb30c11956c1c8df4023eb guix-build-aa3bbe2ea218/output/arm64-apple-darwin/bitcoin-aa3bbe2ea218-arm64-apple-darwin-codesigning.tar.gz
12b397bb76d18d5bd9cd21d91c78d64c58dc32b20823953f5f6909e40f26ef5b guix-build-aa3bbe2ea218/output/arm64-apple-darwin/bitcoin-aa3bbe2ea218-arm64-apple-darwin-unsigned.tar.gz
072d890fe500e86d59441778e8d1cc2b4a5a3bb5e1fa1fcaba443f713a2e3bb2 guix-build-aa3bbe2ea218/output/arm64-apple-darwin/bitcoin-aa3bbe2ea218-arm64-apple-darwin-unsigned.zip
16c8ec7d7f16dfa24c1dd2b1f72d02207be3769e8b7ae57e31fd3285a22bf9d0 guix-build-aa3bbe2ea218/output/dist-archive/bitcoin-aa3bbe2ea218.tar.gz
a321e30a01ee92115eccd85e2dfc04a0853939a7396854e93d530f9bc7dd5feb guix-build-aa3bbe2ea218/output/powerpc64-linux-gnu/SHA256SUMS.part
fcc07d881190898c1b5ec62d128ea1c920ab5b93141b27f5cbc4bbffdb955ae2 guix-build-aa3bbe2ea218/output/powerpc64-linux-gnu/bitcoin-aa3bbe2ea218-powerpc64-linux-gnu-debug.tar.gz
d294b23f21efcb42b80cca6517a8ade2f551ff91cba9a1087551ebafefc5b579 guix-build-aa3bbe2ea218/output/powerpc64-linux-gnu/bitcoin-aa3bbe2ea218-powerpc64-linux-gnu.tar.gz
7d767fd902ce82b913c232079125fb39e50a7fd3ea8716de53cd5e43f9097135 guix-build-aa3bbe2ea218/output/riscv64-linux-gnu/SHA256SUMS.part
d6d9e2f7857e6ee07a3de4eb62f389210ec675a96f79da32870f49d4426a5800 guix-build-aa3bbe2ea218/output/riscv64-linux-gnu/bitcoin-aa3bbe2ea218-riscv64-linux-gnu-debug.tar.gz
645437534011d3379e78ea2e725eb981c9239a54b2074c4dc475d666673e61fc guix-build-aa3bbe2ea218/output/riscv64-linux-gnu/bitcoin-aa3bbe2ea218-riscv64-linux-gnu.tar.gz
96bcf9374a0bac414c93ee7b10562dafee4b1ab8e6e26c70455de9ab895d4699 guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/SHA256SUMS.part
a9b28e8b47c4a4763d884b35bda7d762baea62012b8a84d140052de1419fec9f guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/bitcoin-aa3bbe2ea218-x86_64-apple-darwin-codesigning.tar.gz
99a3c91cfb265ee54b92994a756f02da3a17c470b78ea449283b7ae331d80e0d guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/bitcoin-aa3bbe2ea218-x86_64-apple-darwin-unsigned.tar.gz
b6378480d9340b3ea7359fd36a1e5d2596bd61b4f55af2c35bb66946aa8b9ea5 guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/bitcoin-aa3bbe2ea218-x86_64-apple-darwin-unsigned.zip
87d286a7d7a1a9d3314bdb119459c0929f8bd07a0b1057f142ef56de0ff03173 guix-build-aa3bbe2ea218/output/x86_64-linux-gnu/SHA256SUMS.part
6bfec675c208926dc3a724b14a6243a04775973f756c28c0e6381e98b31c990b guix-build-aa3bbe2ea218/output/x86_64-linux-gnu/bitcoin-aa3bbe2ea218-x86_64-linux-gnu-debug.tar.gz
0deba9d8d6f822a46e0402bd4dd45ca1aaec3b2beda968078e9f80c8f1ed9fb5 guix-build-aa3bbe2ea218/output/x86_64-linux-gnu/bitcoin-aa3bbe2ea218-x86_64-linux-gnu.tar.gz
501de61ed069dc2cb870f6b24233add5cf615b590163a3147557d89f9a8f2c98 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/SHA256SUMS.part
64613dafb19a609574f3c2357aa5f7f8c6e596052a28d5b75fd1cb99229a82b2 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-codesigning.tar.gz
b21b5f257847361ea46236eadc46f2fba5203ce3ce9404bcaa8b0784cdd6395d guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-debug.zip
85f42938bc43eae94561b8b0ad929256b10015883538abc0a4c72568d38dbda0 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-setup-unsigned.exe
d1cc3f18e7fbd064e593b8a15548bee9dc23a5d2e00ad1eaf7629f3780988497 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-unsigned.zip
x86_64
55d2df2755f4533cb38d8cb13a02d5d3ff9f07416fb97597fc81679f610159ba guix-build-aa3bbe2ea218/output/aarch64-linux-gnu/SHA256SUMS.part
8d8861c3ffb2f841e4a6cd4c018d0f656f025fbc976be266f7532302bba26e36 guix-build-aa3bbe2ea218/output/aarch64-linux-gnu/bitcoin-aa3bbe2ea218-aarch64-linux-gnu-debug.tar.gz
fe2cd08a58db5da330e70eca9bd2a29f6922686f7cab9c36599a683da81a3c47 guix-build-aa3bbe2ea218/output/aarch64-linux-gnu/bitcoin-aa3bbe2ea218-aarch64-linux-gnu.tar.gz
89534395b221b0be8d076a34e147285b30636fe2fe4685df0c2ac5dd6244c8ae guix-build-aa3bbe2ea218/output/arm-linux-gnueabihf/SHA256SUMS.part
9fa95a8d0990d270965dde7ab6e4465221ef1693ee60a6c6ba3b02fe3602e058 guix-build-aa3bbe2ea218/output/arm-linux-gnueabihf/bitcoin-aa3bbe2ea218-arm-linux-gnueabihf-debug.tar.gz
0a58a126e4fc1150d76ec4ca9cd1fe864ccdaec1536055adb977c221801f2ef0 guix-build-aa3bbe2ea218/output/arm-linux-gnueabihf/bitcoin-aa3bbe2ea218-arm-linux-gnueabihf.tar.gz
5a5bb6f80eb68eff565767d039d523555e715c620705c3329d4e240073a84799 guix-build-aa3bbe2ea218/output/arm64-apple-darwin/SHA256SUMS.part
753b9cccd5a4c20f4da34183533a385c52454facf4cb30c11956c1c8df4023eb guix-build-aa3bbe2ea218/output/arm64-apple-darwin/bitcoin-aa3bbe2ea218-arm64-apple-darwin-codesigning.tar.gz
12b397bb76d18d5bd9cd21d91c78d64c58dc32b20823953f5f6909e40f26ef5b guix-build-aa3bbe2ea218/output/arm64-apple-darwin/bitcoin-aa3bbe2ea218-arm64-apple-darwin-unsigned.tar.gz
072d890fe500e86d59441778e8d1cc2b4a5a3bb5e1fa1fcaba443f713a2e3bb2 guix-build-aa3bbe2ea218/output/arm64-apple-darwin/bitcoin-aa3bbe2ea218-arm64-apple-darwin-unsigned.zip
16c8ec7d7f16dfa24c1dd2b1f72d02207be3769e8b7ae57e31fd3285a22bf9d0 guix-build-aa3bbe2ea218/output/dist-archive/bitcoin-aa3bbe2ea218.tar.gz
a321e30a01ee92115eccd85e2dfc04a0853939a7396854e93d530f9bc7dd5feb guix-build-aa3bbe2ea218/output/powerpc64-linux-gnu/SHA256SUMS.part
fcc07d881190898c1b5ec62d128ea1c920ab5b93141b27f5cbc4bbffdb955ae2 guix-build-aa3bbe2ea218/output/powerpc64-linux-gnu/bitcoin-aa3bbe2ea218-powerpc64-linux-gnu-debug.tar.gz
d294b23f21efcb42b80cca6517a8ade2f551ff91cba9a1087551ebafefc5b579 guix-build-aa3bbe2ea218/output/powerpc64-linux-gnu/bitcoin-aa3bbe2ea218-powerpc64-linux-gnu.tar.gz
7d767fd902ce82b913c232079125fb39e50a7fd3ea8716de53cd5e43f9097135 guix-build-aa3bbe2ea218/output/riscv64-linux-gnu/SHA256SUMS.part
d6d9e2f7857e6ee07a3de4eb62f389210ec675a96f79da32870f49d4426a5800 guix-build-aa3bbe2ea218/output/riscv64-linux-gnu/bitcoin-aa3bbe2ea218-riscv64-linux-gnu-debug.tar.gz
645437534011d3379e78ea2e725eb981c9239a54b2074c4dc475d666673e61fc guix-build-aa3bbe2ea218/output/riscv64-linux-gnu/bitcoin-aa3bbe2ea218-riscv64-linux-gnu.tar.gz
96bcf9374a0bac414c93ee7b10562dafee4b1ab8e6e26c70455de9ab895d4699 guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/SHA256SUMS.part
a9b28e8b47c4a4763d884b35bda7d762baea62012b8a84d140052de1419fec9f guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/bitcoin-aa3bbe2ea218-x86_64-apple-darwin-codesigning.tar.gz
99a3c91cfb265ee54b92994a756f02da3a17c470b78ea449283b7ae331d80e0d guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/bitcoin-aa3bbe2ea218-x86_64-apple-darwin-unsigned.tar.gz
b6378480d9340b3ea7359fd36a1e5d2596bd61b4f55af2c35bb66946aa8b9ea5 guix-build-aa3bbe2ea218/output/x86_64-apple-darwin/bitcoin-aa3bbe2ea218-x86_64-apple-darwin-unsigned.zip
87d286a7d7a1a9d3314bdb119459c0929f8bd07a0b1057f142ef56de0ff03173 guix-build-aa3bbe2ea218/output/x86_64-linux-gnu/SHA256SUMS.part
6bfec675c208926dc3a724b14a6243a04775973f756c28c0e6381e98b31c990b guix-build-aa3bbe2ea218/output/x86_64-linux-gnu/bitcoin-aa3bbe2ea218-x86_64-linux-gnu-debug.tar.gz
0deba9d8d6f822a46e0402bd4dd45ca1aaec3b2beda968078e9f80c8f1ed9fb5 guix-build-aa3bbe2ea218/output/x86_64-linux-gnu/bitcoin-aa3bbe2ea218-x86_64-linux-gnu.tar.gz
501de61ed069dc2cb870f6b24233add5cf615b590163a3147557d89f9a8f2c98 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/SHA256SUMS.part
64613dafb19a609574f3c2357aa5f7f8c6e596052a28d5b75fd1cb99229a82b2 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-codesigning.tar.gz
b21b5f257847361ea46236eadc46f2fba5203ce3ce9404bcaa8b0784cdd6395d guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-debug.zip
85f42938bc43eae94561b8b0ad929256b10015883538abc0a4c72568d38dbda0 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-setup-unsigned.exe
d1cc3f18e7fbd064e593b8a15548bee9dc23a5d2e00ad1eaf7629f3780988497 guix-build-aa3bbe2ea218/output/x86_64-w64-mingw32/bitcoin-aa3bbe2ea218-win64-unsigned.zip
Same x86_64 hashes a @0xB10C and @davidgumberg above.
Lightly tested the binary on a MacBook Pro M4 with macOS 26.4.1.
I tried a build with --icf=all too, but there's no size difference (for arm64)
My LLM friend thinks that --icf=safe is not actually safe, because without an address-significance table (-faddrsig) it's equivalent to --icf=all.
Fresh numbers from the rebuilt artifacts:
| variant | commit | bin/ total |
libexec/ total |
tar.gz savings |
|---|---|---|---|---|
master @ ccbd00ab87c0 |
ccbd00ab87c09779e9edc589af6df5c967687a2f | 55,277,340 | 76,844,864 | 0.00 MB |
-faddrsig --icf=safe |
55ea6999c8618438649800c674faee721278169b | 52,617,668 | 72,106,840 | 1.84 MB |
--icf=all |
22d9baefb1af13300d5d6f423a6ffc28b1218428 | 52,468,852 | 71,892,200 | 1.92 MB |
-faddrsig --icf=all |
64bb33a8ab0846698982143e8e16b51848c9e617 | 52,468,852 | 71,892,200 | 1.92 MB |
--icf=safe |
aa3bbe2ea218c9645fe43d0df3aa2cbdf30a99cc | 52,468,852 | 71,892,200 | 1.92 MB |
Branch with the above combinations: codex/icf-combinations
Update: numbers are for HOSTS="arm64-apple-darwin"
address-significance table (-faddrsig)
Can you elaborate? According to what you linked, -faddrsig only has an effect on ELF targets. We are only using the flag for Darwin (MACHO) targets here.
I don't know, but the table shows a difference between just --icf=safe and -faddrsig --icf=safe for the macOS arm64 target (I updated my comment above to specify arm64-apple-darwin).
I had it generate an example:
void f(void) {}
void g(void) {}
void (*p)(void) = f;
int main(void) { return p == g; }
<details><summary>Try this on a guix machine:</summary>
mkdir -p tmp/addrsig-check
HOST=arm64-apple-darwin \
guix time-machine \
--url=https://codeberg.org/guix/guix.git \
--commit=c5eee3336cc1d10a3cc1c97fde2809c3451624d3 \
-- shell \
--manifest=contrib/guix/manifest.scm \
--pure \
-- bash -lc '
set -eu
cat > tmp/addrsig-check/test.c <<EOF
void f(void) {}
void g(void) {}
void (*p)(void) = f;
int main(void) { return p == g; }
EOF
clang --target=arm64-apple-darwin -c tmp/addrsig-check/test.c -o tmp/addrsig-check/no-addrsig.o
clang --target=arm64-apple-darwin -faddrsig -c tmp/addrsig-check/test.c -o tmp/addrsig-check/with-addrsig.o
echo "clang version:"
clang --version | head -1
echo
echo "driver passes -faddrsig to cc1:"
clang --target=arm64-apple-darwin -faddrsig -### -c tmp/addrsig-check/test.c -o /dev/null 2>&1 | grep -- -faddrsig || true
echo
echo "without -faddrsig:"
llvm-objdump --macho --section-headers tmp/addrsig-check/no-addrsig.o | grep llvm_addrsig || true
echo
echo "with -faddrsig:"
llvm-objdump --macho --section-headers tmp/addrsig-check/with-addrsig.o | grep llvm_addrsig || true
'
</details>
It outputs:
without -faddrsig:
with -faddrsig:
3 __llvm_addrsig 00000008 0000000000000098 DATA
So I guess that help page I linked to is wrong.