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

only build exception_tracer on elf platforms with libdwarf

Summary: FOLLY_USE_SYMBOLIZER is too coarse of a flag to determine whether ExceptionTracer is available. Instead, use FOLLY_HAVE_ELF and FOLLY_HAVE_DWARF.

Reviewed By: yfeldblum, luciang

Differential Revision: D23361407

fbshipit-source-id: 2326f185c98f58e7afb007befc9121a365c22e77
parent 82d65ef5
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
if (FOLLY_USE_SYMBOLIZER) if (FOLLY_HAVE_ELF AND FOLLY_HAVE_DWARF)
add_library( add_library(
folly_exception_tracer_base folly_exception_tracer_base
ExceptionTracer.cpp ExceptionTracer.cpp
......
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#include <folly/experimental/exception_tracer/StackTrace.h> #include <folly/experimental/exception_tracer/StackTrace.h>
#include <folly/experimental/symbolizer/Symbolizer.h> #include <folly/experimental/symbolizer/Symbolizer.h>
#if FOLLY_HAVE_ELF && FOLLY_HAVE_DWARF
namespace { namespace {
using namespace ::folly::exception_tracer; using namespace ::folly::exception_tracer;
...@@ -242,7 +244,9 @@ void installHandlers() { ...@@ -242,7 +244,9 @@ void installHandlers() {
}; };
static Once once; static Once once;
} }
#endif #endif // FOLLY_USE_LIBSTDCPP
} // namespace exception_tracer } // namespace exception_tracer
} // namespace folly } // namespace folly
#endif // FOLLY_HAVE_ELF && FOLLY_HAVE_DWARF
...@@ -24,6 +24,10 @@ ...@@ -24,6 +24,10 @@
#include <typeinfo> #include <typeinfo>
#include <vector> #include <vector>
#include <folly/portability/Config.h>
#if FOLLY_HAVE_ELF && FOLLY_HAVE_DWARF
namespace folly { namespace folly {
namespace exception_tracer { namespace exception_tracer {
...@@ -54,3 +58,5 @@ void installHandlers(); ...@@ -54,3 +58,5 @@ void installHandlers();
} // namespace exception_tracer } // namespace exception_tracer
} // namespace folly } // namespace folly
#endif // FOLLY_HAVE_ELF && FOLLY_HAVE_DWARF
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