From 0f990d018357413d5eab36b361aa9236e6b8795d Mon Sep 17 00:00:00 2001 From: redfish Date: Wed, 27 Jul 2016 01:02:55 -0400 Subject: cmake,common: flag for stack trace By default the flag is enabled whenever libunwind is found on the system, with the exception of static build on OSX (for which we can't install the throw hook #932 due to lack of support for --wrap in OSX ld64 linker). --- src/daemon/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/daemon/main.cpp') diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index 638fae20e..2e8953af9 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -31,7 +31,6 @@ #include "common/command_line.h" #include "common/scoped_message_writer.h" #include "common/util.h" -#include "common/stack_trace.h" #include "cryptonote_core/cryptonote_core.h" #include "cryptonote_core/miner.h" #include "daemon/command_server.h" @@ -44,6 +43,10 @@ #include "daemon/command_line_args.h" #include "blockchain_db/db_types.h" +#ifdef STACK_TRACE +#include "common/stack_trace.h" +#endif // STACK_TRACE + namespace po = boost::program_options; namespace bf = boost::filesystem; @@ -269,7 +272,9 @@ int main(int argc, char const * argv[]) , log_file_path.filename().string().c_str() , log_file_path.parent_path().string().c_str() ); +#ifdef STACK_TRACE tools::set_stack_trace_log(log_file_path.filename().string()); +#endif // STACK_TRACE } if (command_line::has_arg(vm, daemon_args::arg_max_concurrency)) -- cgit v1.2.3