How to get support for thread_local on Mac OSX cla

2019-04-24 11:32发布

As shown in this answer, clang from Xcode on Mac OSX does not support thread_local storage even with C++11 flags set. Even on the latest version, Apple LLVM version 7.0.0 (clang-700.1.76), Target: x86_64-apple-darwin15.0.0, Thread model: posix, does not support thread_local:

../../src/dir/sysArch.h:1505:3: error: thread-local storage is not supported
                                       for the current target
  thread_local
  ^

1条回答
女痞
2楼-- · 2019-04-24 12:04

The version of clang supplied with Xcode 8 (and later) supports the thread_local keyword; see the discussion here.

查看更多
登录 后发表回答