move futures/test/ExecutorTest.cpp to executors/
[folly.git] / folly / SingletonStackTrace.cpp
index 3e1f87cc3f98bbf165be8a2083917bbd54991d55..f5d5f97b6898ba19869e3ea5bbd6ebb0f69c77ba 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2015 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+#include <folly/portability/Config.h>
+
+#ifdef FOLLY_USE_SYMBOLIZER
 #include <folly/Singleton.h>
-#include <folly/experimental/symbolizer/Symbolizer.h>
+#include <folly/experimental/symbolizer/Symbolizer.h> // @manual
 
 namespace folly {
 
@@ -46,8 +50,12 @@ struct SetStackTraceGetter {
   }
 };
 
+#ifdef __APPLE__
+// OS X doesn't support constructor priorities.
 SetStackTraceGetter setStackTraceGetter;
-
+#else
+SetStackTraceGetter __attribute__((__init_priority__(101))) setStackTraceGetter;
+#endif
 }
-
 }
+#endif