Commit d1d2a9d6 authored by Andrew Gallagher's avatar Andrew Gallagher Committed by Facebook Github Bot

folly: make `FOLLY_USE_SYMBOLIZER` gates check for `1`

Summary: This diff change the `FOLLY_USE_SYMBOLIZER` gates to check for a value of `1`.

Reviewed By: yfeldblum

Differential Revision: D7471272

fbshipit-source-id: 74dbb4d56e1adc56ec75af5b4950ca2c027851cc
parent 7c996f43
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <folly/Format.h> #include <folly/Format.h>
#include <folly/ScopeGuard.h> #include <folly/ScopeGuard.h>
#ifdef FOLLY_USE_SYMBOLIZER #if FOLLY_USE_SYMBOLIZER
#include <folly/experimental/symbolizer/Symbolizer.h> // @manual #include <folly/experimental/symbolizer/Symbolizer.h> // @manual
#endif #endif
...@@ -386,7 +386,7 @@ void SingletonVault::scheduleDestroyInstances() { ...@@ -386,7 +386,7 @@ void SingletonVault::scheduleDestroyInstances() {
// Singltone's to use it to print stack traces. It's important that we keep // Singltone's to use it to print stack traces. It's important that we keep
// this in the same compilation unit as the `SingletonVault` so that it's // this in the same compilation unit as the `SingletonVault` so that it's
// setup/used iff singleton's are used. // setup/used iff singleton's are used.
#ifdef FOLLY_USE_SYMBOLIZER #if FOLLY_USE_SYMBOLIZER
namespace { namespace {
std::string stackTraceGetter() { std::string stackTraceGetter() {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <folly/Singleton.h> #include <folly/Singleton.h>
#include <folly/portability/Config.h> #include <folly/portability/Config.h>
#ifdef FOLLY_USE_SYMBOLIZER #if FOLLY_USE_SYMBOLIZER
#include <folly/experimental/symbolizer/SignalHandler.h> // @manual #include <folly/experimental/symbolizer/SignalHandler.h> // @manual
#endif #endif
#include <folly/portability/GFlags.h> #include <folly/portability/GFlags.h>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
namespace folly { namespace folly {
void init(int* argc, char*** argv, bool removeFlags) { void init(int* argc, char*** argv, bool removeFlags) {
#ifdef FOLLY_USE_SYMBOLIZER #if FOLLY_USE_SYMBOLIZER
// Install the handler now, to trap errors received during startup. // Install the handler now, to trap errors received during startup.
// The callbacks, if any, can be installed later // The callbacks, if any, can be installed later
folly::symbolizer::installFatalSignalHandler(); folly::symbolizer::installFatalSignalHandler();
...@@ -46,7 +46,7 @@ void init(int* argc, char*** argv, bool removeFlags) { ...@@ -46,7 +46,7 @@ void init(int* argc, char*** argv, bool removeFlags) {
auto programName = argc && argv && *argc > 0 ? (*argv)[0] : "unknown"; auto programName = argc && argv && *argc > 0 ? (*argv)[0] : "unknown";
google::InitGoogleLogging(programName); google::InitGoogleLogging(programName);
#ifdef FOLLY_USE_SYMBOLIZER #if FOLLY_USE_SYMBOLIZER
// Don't use glog's DumpStackTraceAndExit; rely on our signal handler. // Don't use glog's DumpStackTraceAndExit; rely on our signal handler.
google::InstallFailureFunction(abort); google::InstallFailureFunction(abort);
......
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