aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-12-28 08:57:59 +0200
committerRiccardo Spagni <ric@spagni.net>2017-12-28 08:57:59 +0200
commit8980aacbe858b26af584888041985b559fcc69c9 (patch)
treeee3d58892eb83bb61588f9a4c3ed0fe11a8f22c4
parentMerge pull request #2952 (diff)
parentonly include the easylogging++ stack trace code when needed (diff)
downloadmonero-8980aacbe858b26af584888041985b559fcc69c9.tar.xz
Merge pull request #2940
da0fd71d only include the easylogging++ stack trace code when needed (moneromooo-monero) 81b04cfa easlogging++: omit some unneded macros (moneromooo-monero)
-rw-r--r--external/easylogging++/ea_config.h9
-rw-r--r--src/common/stack_trace.cpp3
2 files changed, 8 insertions, 4 deletions
diff --git a/external/easylogging++/ea_config.h b/external/easylogging++/ea_config.h
index 6215e67de..c97858f30 100644
--- a/external/easylogging++/ea_config.h
+++ b/external/easylogging++/ea_config.h
@@ -2,10 +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