How to get support for thread_local on Mac OSX clang?

时光总嘲笑我的痴心妄想 提交于 2019-12-10 03:22:58

问题


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:


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



来源:https://stackoverflow.com/questions/33358417/how-to-get-support-for-thread-local-on-mac-osx-clang

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!