aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-16 15:30:56 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-26 11:40:15 +0000
commitda0fd71d3eae7d45ac1e884190bfd5a2b3eb917a (patch)
tree9c8624723a93a9e230d4e84b058aed0b220dfbe1
parenteaslogging++: omit some unneded macros (diff)
downloadmonero-da0fd71d3eae7d45ac1e884190bfd5a2b3eb917a.tar.xz
only include the easylogging++ stack trace code when needed
-rw-r--r--external/easylogging++/ea_config.h8
-rw-r--r--src/common/stack_trace.cpp3
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 <stdexcept>
#ifdef USE_UNWIND