From ce9e2df36ae6c86ee77dabbf9a6f97f32c39fe26 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 4 Aug 2016 15:40:29 -0700 Subject: [PATCH] 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 --- folly/detail/ThreadLocalDetail.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.34.1