Disable the use of direct TLS in ThreadLocalDetail under MSVC
authorChristopher Dykes <cdykes@fb.com>
Thu, 4 Aug 2016 22:40:29 +0000 (15:40 -0700)
committerFacebook Github Bot 8 <facebook-github-bot-8-bot@fb.com>
Thu, 4 Aug 2016 22:54:25 +0000 (15:54 -0700)
Summary: The comment tells the truth: StaticMeta doesn't mix well with MSVC's TLS implementation.

Reviewed By: yfeldblum

Differential Revision: D3671274

fbshipit-source-id: 293eb32699ad5cee59965f24f985ec7099c90136

folly/detail/ThreadLocalDetail.h

index 6aaccc2b2c1a9579a7f9d902523d6c3e6659e437..68676a23433e4d3d93c3f6f1722d08dcd8f1c27f 100644 (file)
@@ -43,7 +43,7 @@
 //
 // XXX: Ideally we would instead determine if emutls is in use at runtime as it
 // is possible to configure glibc on Linux to use emutls regardless.
-#if !FOLLY_MOBILE && !defined(__APPLE__)
+#if !FOLLY_MOBILE && !defined(__APPLE__) && !defined(_MSC_VER)
 #define FOLLY_TLD_USE_FOLLY_TLS 1
 #else
 #undef FOLLY_TLD_USE_FOLLY_TLS