depends: remove NO_HARDEN option #32038

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:depends_remove_noharden changing 5 files +4 −21
  1. fanquake commented at 12:06 pm on March 12, 2025: member
    This was only needed to work around a (Libtool related iirc) Windows issue, when hardening was disabled. I can no-longer recreate this failure, so it’d be good to remove this Windows carveout.
  2. depends: remove NO_HARDEN option
    This only existed to workaround a (iirc libtool related) windows issue
    that only occured when compiling without hardening. We no-longer use
    libtool, and I can no-longer create the failure.
    5dfef6b9b3
  3. DrahtBot commented at 12:06 pm on March 12, 2025: contributor

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

    Code Coverage & Benchmarks

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

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK davidgumberg, laanwj
    Concept ACK hebasto

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #31802 (Add bitcoin-{node,gui} to release binaries for IPC by Sjors)

    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.

  4. DrahtBot added the label Build system on Mar 12, 2025
  5. laanwj commented at 12:28 pm on March 12, 2025: member
    Concept ACK, for a project like this it’s unreasonable to disable hardening features, there is no reason to maintain this functionailty.
  6. hebasto commented at 3:45 pm on March 12, 2025: member
    Concept ACK.
  7. davidgumberg commented at 8:38 pm on March 12, 2025: contributor

    crACK 5dfef6b9b379f51e

    Sanity tested that the following depends build works:

    0make -C depends/ HOST=x86_64-w64-mingw32
    1cmake -B build --toolchain depends/x86_64-w64-mingw32/toolchain.cmake
    2cmake --build build
    

    for a project like this it’s unreasonable to disable hardening features

    Would it make sense to also drop ENABLE_HARDENING? Currently set OFF in the clang-tidy ci job, but I flipped it ON and ran the clang-tidy job locally and it seems to work. (But I have no context for why hardening was disabled in clang-tidy cc: @maflcko)

  8. DrahtBot requested review from hebasto on Mar 12, 2025
  9. DrahtBot requested review from laanwj on Mar 12, 2025
  10. laanwj commented at 9:15 am on March 13, 2025: member

    Would it make sense to also drop ENABLE_HARDENING? Currently set OFF in the clang-tidy ci job, but I flipped it ON and ran the clang-tidy job locally and it seems to work. (But I have no context for why hardening was disabled in clang-tidy cc: @maflcko)

    Right, if it’s needed for some of our own tooling/testing that might be a valid reason to keep it, but otherwise, nah.

    And even then cmake provides ways to override the CXXFLAGS and such entirely if someone needs to build with specific flags only. No reason to single out hardening there.

  11. laanwj approved
  12. laanwj commented at 9:46 am on March 13, 2025: member
    Code review ACK 5dfef6b9b379f51e69f2a358c05ae3c3e8a26e13
  13. fanquake merged this on Mar 14, 2025
  14. fanquake closed this on Mar 14, 2025

  15. fanquake deleted the branch on Mar 14, 2025
  16. maflcko commented at 7:47 am on March 14, 2025: member

    Would it make sense to also drop ENABLE_HARDENING? Currently set OFF in the clang-tidy ci job, but I flipped it ON and ran the clang-tidy job locally and it seems to work. (But I have no context for why hardening was disabled in clang-tidy cc: @maflcko)

    IIRC it was added in fab24f8c3540b6f1a128cb9d6812df6678472b8d, because I copy-pasted it from another CI task and forgot to remove it. I guess it would be best to remove it, if it is confusing and the removal doesn’t cause issues.

    (Edit: An alternative guess could be to minimize the number of compiler options in an attempt to speed up compilation, but without benchmarks this seems like premature optimization)

  17. davidgumberg referenced this in commit 7d34c19853 on Mar 14, 2025
  18. davidgumberg commented at 7:07 pm on March 14, 2025: contributor
    I’ve opened #32071 to drop the ENABLE_HARDENING option in Bitcoin Core builds.

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: 2025-03-31 09:12 UTC

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