Mark implicitly inlined static locals with default visibility
authorAndrew Gallagher <andrewjcg@fb.com>
Tue, 8 Nov 2016 00:10:41 +0000 (16:10 -0800)
committerFacebook Github Bot <facebook-github-bot-bot@fb.com>
Tue, 8 Nov 2016 00:23:30 +0000 (16:23 -0800)
Summary:
These functions contain static locals which need to be exported to
the global dynamic symbol table to get deduplicated at runtime.  Since
using `-fvisibility-inlines-hidden` demotes the visibility of these
static locals, explicitly tag them.

Reviewed By: yfeldblum

Differential Revision: D4139154

fbshipit-source-id: 08b81721c6c945ac5556472481ae771d0eeb5f88

folly/fibers/FiberManagerInternal.h

index 28c74db641d97178f58fab32cda8b6456a7414a3..254c83cc159c06d879d4a7715b367c92a4ac407a 100644 (file)
@@ -25,6 +25,7 @@
 #include <vector>
 
 #include <folly/AtomicIntrusiveLinkedList.h>
+#include <folly/CPortability.h>
 #include <folly/Executor.h>
 #include <folly/IntrusiveList.h>
 #include <folly/Likely.h>
@@ -253,7 +254,7 @@ class FiberManager : public ::folly::Executor {
   T& local();
 
   template <typename T>
-  static T& localThread();
+  FOLLY_EXPORT static T& localThread();
 
   /**
    * @return How many fiber objects (and stacks) has this manager allocated.