Commit 0666e8d5 authored by Chad Austin's avatar Chad Austin Committed by Facebook GitHub Bot

fix exception_tracer build on macOS

Summary:
exception_tracer is currently gated on FOLLY_USE_SYMBOLIZER, and when
I enabled it, I didn't notice the CMake build of Folly on macOS
stopped working.

Fix it by adding correct conditionals, and removing the removed
std::unexpected_handler.

Reviewed By: yfeldblum, lnicco

Differential Revision: D23690777

fbshipit-source-id: 76ada7911ac33de3b1e8b0a73cebf3c2d04a58ef
parent cd60da45
...@@ -30,7 +30,8 @@ namespace __cxxabiv1 { ...@@ -30,7 +30,8 @@ namespace __cxxabiv1 {
struct __cxa_exception { struct __cxa_exception {
std::type_info* exceptionType; std::type_info* exceptionType;
void (*exceptionDestructor)(void*); void (*exceptionDestructor)(void*);
std::unexpected_handler unexpectedHandler; void (*unexpectedHandler)(); // std::unexpected_handler has been removed from
// C++17.
std::terminate_handler terminateHandler; std::terminate_handler terminateHandler;
__cxa_exception* nextException; __cxa_exception* nextException;
......
...@@ -66,6 +66,7 @@ void printExceptionInfo( ...@@ -66,6 +66,7 @@ void printExceptionInfo(
} }
out << " (" << info.frames.size() out << " (" << info.frames.size()
<< (info.frames.size() == 1 ? " frame" : " frames") << ")\n"; << (info.frames.size() == 1 ? " frame" : " frames") << ")\n";
#if FOLLY_HAVE_ELF && FOLLY_HAVE_DWARF
try { try {
size_t frameCount = info.frames.size(); size_t frameCount = info.frames.size();
...@@ -92,6 +93,7 @@ void printExceptionInfo( ...@@ -92,6 +93,7 @@ void printExceptionInfo(
} catch (...) { } catch (...) {
out << "\n !!! caught unexpected exception\n"; out << "\n !!! caught unexpected exception\n";
} }
#endif
} }
namespace { namespace {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment