build: pass bdb cppflags only where needed #25244

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:use_bdb_cppflags_needed changing 2 files +4 −2
  1. fanquake commented at 10:32 AM on May 30, 2022: member

    Move bdb cppflags out of the catch-all BITCOIN_INCLUDES, and pass them only where they are needed, which is in libbitcoin_node/wallet and the tests.

  2. fanquake added the label Build system on May 30, 2022
  3. hebasto commented at 12:45 PM on May 30, 2022: member

    Concept ACK.

    Is guarding with USE_BDB condition really required? If it fails, the BDB_CPPFLAGS is just unset, no?

  4. laanwj commented at 5:07 PM on May 30, 2022: member

    Concept ACK

  5. build: pass bdb cppflags only where needed
    Move bdb cppflags out of the catch-all BITCOIN_INCLUDES, and pass them
    only where they are needed, which is in libbitcoin_node/wallet and the
    tests.
    46a890960e
  6. fanquake force-pushed on May 31, 2022
  7. fanquake commented at 5:40 AM on May 31, 2022: member

    Is guarding with USE_BDB condition really required?

    dropped

  8. fanquake requested review from hebasto on Jun 1, 2022
  9. hebasto approved
  10. hebasto commented at 10:34 AM on June 1, 2022: member

    ACK 46a890960e4b07e5aec479aa8e07e9c34ce68aee

    The <db_cxx.h> included in the wallet/bdb.h only. Therefore, BDB_CPPFLAGS are required only for libraries which sources have #include <wallet/bdb.h>.

    nit, the following diff

    --- a/src/Makefile.test.include
    +++ b/src/Makefile.test.include
    @@ -177,6 +177,7 @@ FUZZ_SUITE_LD_COMMON +=\
     
     if USE_BDB
     BITCOIN_TESTS += wallet/test/db_tests.cpp
    +test_test_bitcoin_CPPFLAGS += $(BDB_CPPFLAGS)
     endif
     
     FUZZ_WALLET_SRC = \
    @@ -201,7 +202,6 @@ test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(TESTDEFS) $(EV
     test_test_bitcoin_LDADD = $(LIBTEST_UTIL)
     if ENABLE_WALLET
     test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
    -test_test_bitcoin_CPPFLAGS += $(BDB_CPPFLAGS)
     endif
     
     test_test_bitcoin_LDADD += $(LIBBITCOIN_NODE) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) \
    

    looks slightly more correct / clear?

  11. fanquake commented at 11:34 AM on June 1, 2022: member

    looks slightly more correct / clear?

    Probably not, given that diff wouldn't compile

  12. fanquake merged this on Jun 1, 2022
  13. fanquake closed this on Jun 1, 2022

  14. fanquake deleted the branch on Jun 1, 2022
  15. sidhujag referenced this in commit c3ac3f1390 on Jun 1, 2022
  16. DrahtBot locked this on Jun 1, 2023

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-04-21 18:13 UTC

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