mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-23 14:53:13 +08:00
Don't rely on __had_feature for g++.
Don't use __thread. Only use thread_local for gcc 4.8 or newer.
This commit is contained in:
parent
668690978f
commit
e9f9d70611
@ -12,10 +12,10 @@
|
|||||||
|
|
||||||
#undef EIGEN_THREAD_LOCAL
|
#undef EIGEN_THREAD_LOCAL
|
||||||
|
|
||||||
#if EIGEN_MAX_CPP_VER>=11 && (__has_feature(cxx_thread_local))
|
#if EIGEN_MAX_CPP_VER >= 11 && \
|
||||||
#define EIGEN_THREAD_LOCAL static thread_local
|
((EIGEN_COMP_GNUC && EIGEN_GNUC_AT_LEAST(4, 8)) || \
|
||||||
#elif (EIGEN_COMP_GNUC && EIGEN_GNUC_AT_MOST(4, 7)) || EIGEN_COMP_CLANG
|
__has_feature(cxx_thread_local))
|
||||||
#define EIGEN_THREAD_LOCAL static __thread
|
#define EIGEN_THREAD_LOCAL static thread_local
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Disable TLS for Apple and Android builds with older toolchains.
|
// Disable TLS for Apple and Android builds with older toolchains.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user