Summary:
OS X doesn't support constructor init priorities, at all. AIUI,
it's a limitation of their actual binary format and loader, not just a
tooling/compiler limitation.
This particular usage appears to just be for for logging/bug-finding
purposes, so it looks like just removing the priority on OS X isn't the
end of the world?
Test Plan: g++-4.9 on OS X compiles this file now.
Reviewed By: njormrod@fb.com
Subscribers: ldbrandy, jdelong, folly-diffs@, yfeldblum, chalfant
FB internal diff:
D2040557
Signature: t1:
2040557:
1430975025:
73f817b5d19a18dca6b19ba783dbea99192cbc41
std::vector<detail::TypeDescriptor> leakedSingletons_;
};
+#ifdef __APPLE__
+// OS X doesn't support constructor priorities.
+FatalHelper fatalHelper;
+#else
FatalHelper __attribute__ ((__init_priority__ (101))) fatalHelper;
+#endif
}