cmake: Add NO_CACHE_IF_FAILED option for checking linker flags #32027

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:250310-nocache changing 2 files +6 −1
  1. hebasto commented at 4:57 pm on March 10, 2025: member

    Use it for checking -fsanitize.

    This change improves the user experience when the configuration step fails due to a missing library. Now, there is no need to manually clean the CMake cache after installing the required library.

    Addresses this comment from #31942.

  2. cmake: Add `NO_CACHE_IF_FAILED` option for checking linker flags
    Use it for checking `-fsanitize`.
    
    This change improves the user experience when the configuration step
    fails due to a missing library. Now, there is no need to manually clean
    the CMake cache after installing the required library.
    52ac17757e
  3. hebasto added the label Build system on Mar 10, 2025
  4. DrahtBot commented at 4:57 pm on March 10, 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/32027.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK fanquake

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

  5. fanquake added this to the milestone 29.0 on Mar 12, 2025
  6. fanquake added the label Needs backport (29.x) on Mar 13, 2025
  7. yancyribbens commented at 6:49 pm on March 15, 2025: contributor
    I’m curious if this would have fixed my issue: #31922 (comment) which sparked the discussion #31942 (comment). As I remember, I had successfully built, and then I was trying to rebuild for fuzzing using clang-16 instead, which was causing a build error. It was resolved by nuking the build folder, although the discussion in #31942 (comment) calls the need to nuke the build director a hack.
  8. Sjors commented at 10:01 am on March 20, 2025: member

    This seems useful, but I’m having a hard time reproducing the issue, or something similar, on macOS, because XCode 15.2 ships with most of the sanitizers.

    I can hit an earlier error:

    0cmake -B build -DSANITIZERS=memory
    1...
    2-- Performing Test CXX_SUPPORTS__FSANITIZE_MEMORY - Failed
    3CMake Error at CMakeLists.txt:362 (message):
    4  Compiler did not accept requested flags.
    

    But then I’d probably have to recompile LLVM.

    Might be easier to reproduce on a linux distro, like the original example.

  9. fanquake approved
  10. fanquake commented at 7:43 am on March 27, 2025: member
    ACK 52ac17757eed5056d03a6861bcc24ee864c17385
  11. fanquake merged this on Mar 27, 2025
  12. fanquake closed this on Mar 27, 2025

  13. hebasto deleted the branch on Mar 27, 2025
  14. glozow referenced this in commit 477345207b on Mar 28, 2025
  15. glozow commented at 6:35 pm on March 28, 2025: member
    Backported in #32136
  16. glozow removed the label Needs backport (29.x) on Mar 28, 2025

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