diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index ef0260bd7a8..c1bada11df5 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -204,16 +204,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 diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc index 207a19c94e4..3599dd3e333 100644 --- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc +++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc @@ -62,13 +62,11 @@ if [ "${PREPARE_BUILD_INSTALL_DEPS_OBJC}" == "true" ] then # cocoapods export LANG=en_US.UTF-8 + time gem install cocoapods --version 1.7.2 --no-document # pre-fetch cocoapods master repo's most recent commit only mkdir -p ~/.cocoapods/repos time git clone --depth 1 https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master - # set xcode version for Obj-C tests - sudo xcode-select -switch /Applications/Xcode_9.2.app/Contents/Developer/ - # Needed for ios-binary-size time pip install --user pyyaml pyjwt cryptography requests @@ -113,9 +111,6 @@ then export NUGET_XMLDOC_MODE=skip export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true export DOTNET_CLI_TELEMETRY_OPTOUT=true - - # Xcode 10+ doesn't support building for i386 architecture - sudo xcode-select -switch /Applications/Xcode_9.2.app/Contents/Developer/ fi # PHP tests currently require using an older version of PHPUnit