refactor: Use static const over inline const to work around ld64 bug #36285

pull maflcko wants to merge 1 commits into bitcoin:master from maflcko:2609-static-const-no-inline changing 2 files +8 −8
  1. maflcko commented at 9:16 AM on September 17, 2026: member

    This partially reverts fa74f58a262096f25d5a3a4ec4951f4ce2a31792 to avoid initialization dependencies, which ld64 fails to handle properly.

    Works around #36281 for now.

    Obviously this will increase the bin size again (70kB for me), but this shouldn't matter much.

  2. refactor: Use static const over inline const to work around ld64 bug
    This partially reverts fa74f58a262096f25d5a3a4ec4951f4ce2a31792 to avoid
    initialization dependencies, which the linker fails to handle properly.
    fa8fefb29b
  3. DrahtBot added the label Refactoring on Sep 17, 2026
  4. DrahtBot commented at 9:16 AM on September 17, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36285.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK janb84, sedited

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. maflcko added the label Needs Backport (32.x) on Sep 17, 2026
  6. maflcko added this to the milestone 32.0 on Sep 17, 2026
  7. maflcko added the label macOS on Sep 17, 2026
  8. willcl-ark commented at 9:29 AM on September 17, 2026: member

    Attempted a run for this here.

    The temporary workflow tests the currently-failing nix devShell against this PR.

    edit: annoyingly looks like my.cdash.org is down so might not get the best output. But we should still see success/failure.

  9. janb84 commented at 9:58 AM on September 17, 2026: contributor

    ACK fa8fefb29b6ce00c27638bc1c6f8ab5d58d48cb0

    This builds, runs and all the test work, on (my) macOS with nix.

  10. maflcko commented at 10:04 AM on September 17, 2026: member

    Attempted a run for this here.

    Hmm, looks like this is clang-lld, but the bug is with ld64? Also, it says 3 - mptest (Failed) (unrelated?), but there is no output/log?

  11. fanquake commented at 10:55 AM on September 17, 2026: member

    which ld64 fails to handle properly.

    Can you clarify if this is ld64 generally, or just the older, patched version that Nix ships? Have we reported this to Nix upstream?

  12. maflcko commented at 11:03 AM on September 17, 2026: member

    I don't have macOS, so there is nothing more I can do here. In theory one could use CI to bisect+minimize+report, but this is a lot more tedious than doing it locally. My recommendation would be to merge this for now and then someone can continue in #36281 over the coming months or so.

  13. sedited approved
  14. sedited commented at 2:10 PM on September 17, 2026: contributor

    ACK fa8fefb29b6ce00c27638bc1c6f8ab5d58d48cb0

  15. sedited merged this on Sep 17, 2026
  16. sedited closed this on Sep 17, 2026

  17. fanquake removed the label Needs Backport (32.x) on Sep 18, 2026
  18. fanquake commented at 9:41 AM on September 18, 2026: member

    Backported to 32.x in #36267.

  19. fanquake referenced this in commit 0d4d0ce37b on Sep 18, 2026
  20. willcl-ark commented at 10:00 AM on September 18, 2026: member

    Hmm, looks like this is clang-lld, but the bug is with ld64? Also, it says 3 - mptest (Failed) (unrelated?), but there is no output/log?

    Two (unrelated!) issues indeed. I had temporarily overridden to clang-lld and selected it by mistake (whoops), but the mptest failure was being caused by a bad cache built using different flags (thanks AI for being bothered to look into that).

    Now being re-run against master (with the fix included and caches cleaned) here.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-09-23 06:50 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me