From: Christopher Dykes Date: Thu, 4 Aug 2016 22:40:29 +0000 (-0700) Subject: Disable the use of direct TLS in ThreadLocalDetail under MSVC X-Git-Tag: v2016.08.08.00~13 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ce9e2df36ae6c86ee77dabbf9a6f97f32c39fe26;p=folly.git Disable the use of direct TLS in ThreadLocalDetail under MSVC 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 --- diff --git a/folly/detail/ThreadLocalDetail.h b/folly/detail/ThreadLocalDetail.h index 6aaccc2b..68676a23 100644 --- a/folly/detail/ThreadLocalDetail.h +++ b/folly/detail/ThreadLocalDetail.h @@ -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