Conditional GPR_STDCPP_TLS on Apple

pull/24572/head
Esun Kim 4 years ago
parent 075d7341e2
commit 94c6766bf1
  1. 10
      include/grpc/impl/codegen/port_platform.h

@ -201,16 +201,22 @@
#if TARGET_OS_IPHONE
#define GPR_PLATFORM_STRING "ios"
#define GPR_CPU_IPHONE 1
#define GPR_STDCPP_TLS 1
#define GRPC_CFSTREAM 1
/* the c-ares resolver isn't safe to enable on iOS */
#define GRPC_ARES 0
#else /* TARGET_OS_IPHONE */
#define GPR_PLATFORM_STRING "osx"
#define GPR_CPU_POSIX 1
#define GPR_STDCPP_TLS 1
#define GPR_POSIX_CRASH_HANDLER 1
#endif
#ifdef __has_feature
#if __has_feature(cxx_thread_local)
#define GPR_STDCPP_TLS 1
#endif
#endif
#ifndef GPR_STDCPP_TLS
#define GPR_PTHREAD_TLS 1
#endif
#define GPR_APPLE 1
#define GPR_GCC_ATOMIC 1
#define GPR_POSIX_LOG 1

Loading…
Cancel
Save