From 81b04cfa888a370b7729cb42ebb7347644bb6f36 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 16 Dec 2017 15:30:36 +0000 Subject: [PATCH 1/2] easlogging++: omit some unneded macros --- external/easylogging++/ea_config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/external/easylogging++/ea_config.h b/external/easylogging++/ea_config.h index 6215e67de..4c63538e4 100644 --- a/external/easylogging++/ea_config.h +++ b/external/easylogging++/ea_config.h @@ -9,3 +9,4 @@ #define ELPP_DISABLE_DEFAULT_CRASH_HANDLING #define ELPP_NO_CHECK_MACROS #define ELPP_WINSOCK2 +#define ELPP_NO_DEBUG_MACROS From da0fd71d3eae7d45ac1e884190bfd5a2b3eb917a Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 16 Dec 2017 15:30:56 +0000 Subject: [PATCH 2/2] only include the easylogging++ stack trace code when needed --- external/easylogging++/ea_config.h | 8 ++++---- src/common/stack_trace.cpp | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/external/easylogging++/ea_config.h b/external/easylogging++/ea_config.h index 4c63538e4..c97858f30 100644 --- a/external/easylogging++/ea_config.h +++ b/external/easylogging++/ea_config.h @@ -2,11 +2,11 @@ #define ELPP_THREAD_SAFE #define ELPP_DEFAULT_LOG_FILE "" -#if !defined __GNUC__ || defined __MINGW32__ || defined __MINGW64__ || defined __ANDROID__ -#else -#define ELPP_FEATURE_CRASH_LOG 1 -#endif #define ELPP_DISABLE_DEFAULT_CRASH_HANDLING #define ELPP_NO_CHECK_MACROS #define ELPP_WINSOCK2 #define ELPP_NO_DEBUG_MACROS + +#ifdef EASYLOGGING_CC +#define ELPP_FEATURE_CRASH_LOG +#endif diff --git a/src/common/stack_trace.cpp b/src/common/stack_trace.cpp index bcdf72b60..ed1093309 100644 --- a/src/common/stack_trace.cpp +++ b/src/common/stack_trace.cpp @@ -28,7 +28,10 @@ #if !defined __GNUC__ || defined __MINGW32__ || defined __MINGW64__ || defined __ANDROID__ #define USE_UNWIND +#else +#define ELPP_FEATURE_CRASH_LOG 1 #endif +#include "easylogging++/easylogging++.h" #include #ifdef USE_UNWIND