aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-02-20 09:29:09 +0000
committerfanquake <fanquake@gmail.com>2022-05-19 09:43:43 +0100
commit06e18e0b53ed34933ecd7f3976a508be72f687aa (patch)
treea6ac054ca7a4e064106ec2bc95382c3c8a92831d /configure.ac
parentfdb82a30bed2297fa5768295207b4723a67d6562 (diff)
downloadbitcoin-06e18e0b53ed34933ecd7f3976a508be72f687aa.tar.xz
build: use BOOST_MULTI_INDEX_ENABLE_SAFE_MODE when debugging
Use of this macro enables precondition checks for iterators and functions of the library. It's use is recommended in debug builds. See: https://www.boost.org/doc/libs/1_78_0/libs/multi_index/doc/tutorial/debug.html.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac4
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6dcc5183ea..70407bc12d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1455,6 +1455,10 @@ if test "$use_boost" = "yes"; then
dnl we don't use multi_index serialization
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION"
+ if test "$enable_debug" = "yes" || test "$enable_fuzz" = "yes"; then
+ BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE"
+ fi
+
if test "$suppress_external_warnings" != "no"; then
BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS)
fi