From ab7328b04858f7ec0d01800fc8ef1fba0c879647 Mon Sep 17 00:00:00 2001 From: khizmax Date: Tue, 17 Mar 2015 16:56:46 +0300 Subject: [PATCH] Apple OS X clang does not support thread_local keyword --- cds/compiler/clang/defs.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cds/compiler/clang/defs.h b/cds/compiler/clang/defs.h index 8b649d10..182a5b83 100644 --- a/cds/compiler/clang/defs.h +++ b/cds/compiler/clang/defs.h @@ -39,7 +39,13 @@ #define CDS_NOEXCEPT_SUPPORT_(expr) noexcept(expr) // C++11 thread_local keyword -#define CDS_CXX11_THREAD_LOCAL_SUPPORT +#if !(CDS_OS_TYPE == CDS_OS_OSX && CDS_COMPILER_VERSION < 30600) + // OS X error? + // See http://stackoverflow.com/questions/23791060/c-thread-local-storage-clang-503-0-40-mac-osx + // http://stackoverflow.com/questions/28094794/why-does-apple-clang-disallow-c11-thread-local-when-official-clang-supports + // clang 3.6 ok?.. +# define CDS_CXX11_THREAD_LOCAL_SUPPORT +#endif // Full SFINAE support #define CDS_CXX11_SFINAE -- 2.34.1