Commit eeb13d00 authored by Francis Ma's avatar Francis Ma Committed by facebook-github-bot-0

Fix FOLLY_TLS under macosx and clang

Summary: Only include guard iphone simulator and iphone devices for folly_tls

Reviewed By: ldemailly

Differential Revision: D2872383

fb-gh-sync-id: 00fb8c1ee03a97037e92d20aeda75f2435d71f5a
parent 53edc275
......@@ -223,9 +223,7 @@ namespace std { typedef ::max_align_t max_align_t; }
* the semantics are the same
* (but remember __thread has different semantics when using emutls (ex. apple))
*/
#if defined(__APPLE__)
#undef FOLLY_TLS
#elif defined(_MSC_VER)
#if defined(_MSC_VER)
# define FOLLY_TLS __declspec(thread)
#elif defined(__GNUC__) || defined(__clang__)
# define FOLLY_TLS __thread
......@@ -233,6 +231,10 @@ namespace std { typedef ::max_align_t max_align_t; }
# error cannot define platform specific thread local storage
#endif
#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
#undef FOLLY_TLS
#endif
// Define to 1 if you have the `preadv' and `pwritev' functions, respectively
#if !defined(FOLLY_HAVE_PREADV) && !defined(FOLLY_HAVE_PWRITEV)
# if defined(__GLIBC_PREREQ)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment