Use DEBUG_CORE instead of a more generic DEBUG when compiling with --enable-debug (#4728)

`DEBUG` is unreliable because of bls/relic internals it seems
This commit is contained in:
UdjinM6 2022-03-15 00:40:40 +03:00 committed by GitHub
parent 1aa50feb4b
commit 15501fd0d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -343,7 +343,7 @@ if test "x$enable_debug" = xyes; then
[AX_CHECK_COMPILE_FLAG([-g],[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g"]],,[[$CXXFLAG_WERROR]])], [AX_CHECK_COMPILE_FLAG([-g],[[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -g"]],,[[$CXXFLAG_WERROR]])],
[[$CXXFLAG_WERROR]]) [[$CXXFLAG_WERROR]])
AX_CHECK_PREPROC_FLAG([-DDEBUG],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG"]],,[[$CXXFLAG_WERROR]]) AX_CHECK_PREPROC_FLAG([-DDEBUG_CORE],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_CORE"]],,[[$CXXFLAG_WERROR]])
AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKORDER],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKORDER"]],,[[$CXXFLAG_WERROR]]) AX_CHECK_PREPROC_FLAG([-DDEBUG_LOCKORDER],[[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -DDEBUG_LOCKORDER"]],,[[$CXXFLAG_WERROR]])
else else
# We always enable at at least -g1 debug info to support proper stacktraces in crash infos # We always enable at at least -g1 debug info to support proper stacktraces in crash infos

View File

@ -1187,7 +1187,7 @@ void InitLogging()
fLogIPs = gArgs.GetBoolArg("-logips", DEFAULT_LOGIPS); fLogIPs = gArgs.GetBoolArg("-logips", DEFAULT_LOGIPS);
std::string version_string = FormatFullVersion(); std::string version_string = FormatFullVersion();
#ifdef DEBUG #ifdef DEBUG_CORE
version_string += " (debug build)"; version_string += " (debug build)";
#else #else
version_string += " (release build)"; version_string += " (release build)";

View File

@ -10,7 +10,7 @@
#include <algorithm> #include <algorithm>
#include <assert.h> #include <assert.h>
#ifdef DEBUG #ifdef DEBUG_CORE
#define CONSTEXPR_IF_NOT_DEBUG #define CONSTEXPR_IF_NOT_DEBUG
#define ASSERT_IF_DEBUG(x) assert((x)) #define ASSERT_IF_DEBUG(x) assert((x))
#else #else