Fix some clang build failures on aarch64
[folly.git] / folly / init / Init.cpp
index 33c7bb03b38c16d7a94acb4992f319ffbcd5fb2c..7a4c5b46b5b8af681e7dd303ac87693ac5ae9578 100644 (file)
 #include <glog/logging.h>
 
 #include <folly/Singleton.h>
+#include <folly/portability/Config.h>
 
 #ifdef FOLLY_USE_SYMBOLIZER
-#include <folly/experimental/symbolizer/SignalHandler.h>
+#include <folly/experimental/symbolizer/SignalHandler.h> // @manual
 #endif
 #include <folly/portability/GFlags.h>
 
@@ -36,6 +37,10 @@ void init(int* argc, char*** argv, bool removeFlags) {
   google::InstallFailureSignalHandler();
 #endif
 
+  // Move from the registration phase to the "you can actually instantiate
+  // things now" phase.
+  folly::SingletonVault::singleton()->registrationComplete();
+
   gflags::ParseCommandLineFlags(argc, argv, removeFlags);
 
   auto programName = argc && argv && *argc > 0 ? (*argv)[0] : "unknown";
@@ -44,15 +49,9 @@ void init(int* argc, char*** argv, bool removeFlags) {
 #ifdef FOLLY_USE_SYMBOLIZER
   // Don't use glog's DumpStackTraceAndExit; rely on our signal handler.
   google::InstallFailureFunction(abort);
-#endif
 
-  // Move from the registration phase to the "you can actually instantiate
-  // things now" phase.
-  folly::SingletonVault::singleton()->registrationComplete();
-
-#ifdef FOLLY_USE_SYMBOLIZER
   // Actually install the callbacks into the handler.
   folly::symbolizer::installFatalSignalCallbacks();
 #endif
 }
-} //!folly
+} // namespace folly