Skip to content

Commit a39002e

Browse files
committed
Merge bitcoin/bitcoin#25170: build: Enable RPC_DOC_CHECK on --enable-debug
fafae67 build: Enable RPC_DOC_CHECK on --enable-debug (MacroFake) Pull request description: This probably makes no large difference, as the setting is already enabled by default in the functional tests. However, I think it is nice to also enable it in debug builds by default to catch issues while manually testing without the runtime flags specified. See also bitcoin/bitcoin#24709 ACKs for top commit: vincenzopalazzo: utACK bitcoin/bitcoin@fafae67 Tree-SHA512: cea3276fc9b5a3bc0f6d9819be9a50b19ecf762729d3e3975abdf00da06beaa3f664b18a826fbab1fedd9143bc0624a95a490bfe40c4b5b0a0f94dbc565ce738
2 parents 4a87098 + fafae67 commit a39002e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ if test "$enable_debug" = "yes"; then
378378

379379
AX_CHECK_PREPROC_FLAG([-DDEBUG], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG"], [], [$CXXFLAG_WERROR])
380380
AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKORDER], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKORDER"], [], [$CXXFLAG_WERROR])
381+
AX_CHECK_PREPROC_FLAG([-DRPC_DOC_CHECK], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DRPC_DOC_CHECK"], [], [$CXXFLAG_WERROR])
381382
AX_CHECK_PREPROC_FLAG([-DABORT_ON_FAILED_ASSUME], [DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DABORT_ON_FAILED_ASSUME"], [], [$CXXFLAG_WERROR])
382383
AX_CHECK_COMPILE_FLAG([-ftrapv], [DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -ftrapv"], [], [$CXXFLAG_WERROR])
383384
fi

src/rpc/util.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@
2222
#include <variant>
2323
#include <vector>
2424

25-
static constexpr bool DEFAULT_RPC_DOC_CHECK{false};
25+
static constexpr bool DEFAULT_RPC_DOC_CHECK{
26+
#ifdef RPC_DOC_CHECK
27+
true
28+
#else
29+
false
30+
#endif
31+
};
2632

2733
/**
2834
* String used to describe UNIX epoch time in documentation, factored out to a

0 commit comments

Comments
 (0)