build: add bitcoind-release preset with only BUILD_DAEMON enabled with release build type #31730

pull l0rinc wants to merge 1 commits into bitcoin:master from l0rinc:l0rinc/bitcoind-release-cmake-preset changing 1 files +31 −0
  1. l0rinc commented at 12:31 pm on January 24, 2025: contributor

    When benchmarking IBD or reindex behavior we have to build bitcoind only, which currently looks like:

    0cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_CLI=OFF -DBUILD_TESTS=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DENABLE_EXTERNAL_SIGNER=OFF -DENABLE_WALLET=OFF -DINSTALL_MAN=OFF
    

    After this change we can simplify that to

    0cmake --preset bitcoind-release
    

    You can validate the change by comparing the outputs of before and after:

    0git clean -fxd >/dev/null 2>&1 \
    1&& stdbuf -oL cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_CLI=OFF -DBUILD_TESTS=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DENABLE_EXTERNAL_SIGNER=OFF -DENABLE_WALLET=OFF -DINSTALL_MAN=OFF 2>&1 | grep -E "( OFF| ON)|CMAKE_BUILD_TYPE"
    

    vs

    0git clean -fxd >/dev/null 2>&1 \
    1&& stdbuf -oL cmake --preset bitcoind-release 2>&1 | grep -E "( OFF| ON)|CMAKE_BUILD_TYPE"
    

    which will only contain a single CMAKE_BUILD_TYPE="Release" (but CMAKE_BUILD_TYPE ...................... Release should be present in both)

  2. build: add `bitcoind-release` preset with only `BUILD_DAEMON` enabled with `release` build type
    When benchmarking IBD or reindex behavior we have to build bitcoind only, which currently looks like:
      cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_CLI=OFF -DBUILD_TESTS=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DENABLE_EXTERNAL_SIGNER=OFF -DENABLE_WALLET=OFF -DINSTALL_MAN=OFF
    After this change we can simplify that to
      cmake --preset bitcoind-release
    466801fd82
  3. DrahtBot commented at 12:31 pm on January 24, 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/31730.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  4. DrahtBot added the label Build system on Jan 24, 2025
  5. maflcko commented at 1:04 pm on January 24, 2025: member
    Seems easier to just call $ cmake --build ./bld/ --target bitcoind? Otherwise there will be a preset for every binary?
  6. l0rinc commented at 1:58 pm on January 24, 2025: contributor

    I can confirm that with -DCMAKE_BUILD_TYPE=Release and -DENABLE_WALLET=OFF, --target bitcoind is indeed a replacement of the above, i.e.:

    0git clean -fxd \
    1&& cmake -B build -DCMAKE_BUILD_TYPE=Release -DENABLE_WALLET=OFF \
    2&& cmake --build build --target bitcoind
    

    produces basically the same output during build phase as:

    0git clean -fxd \
    1&& cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_CLI=OFF -DBUILD_TESTS=OFF -DBUILD_TX=OFF -DBUILD_UTIL=OFF -DENABLE_EXTERNAL_SIGNER=OFF -DENABLE_WALLET=OFF -DINSTALL_MAN=OFF \
    2&& cmake --build build
    

    Thanks!

  7. l0rinc closed this on Jan 24, 2025

  8. l0rinc deleted the branch on Jan 24, 2025
  9. l0rinc referenced this in commit f13c2c4770 on Jan 25, 2025
  10. l0rinc referenced this in commit c3aca72b29 on Jan 25, 2025
  11. l0rinc referenced this in commit ed33a0d554 on Jan 28, 2025
  12. l0rinc referenced this in commit f193c6e260 on Jan 28, 2025
  13. fanquake referenced this in commit f236854a5b on Feb 20, 2025
  14. bitcoin locked this on Jan 24, 2026

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-02-11 03:13 UTC

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