Fix compilation of <atomic> with ICC and libc++
The libc++ header does this: #if !__has_feature(cxx_atomic) #error <atomic> is not implemented So we can't enable the feature until the compiler reports true for that test. Change-Id: I96f1c7eea8b93d93bd721fe5a85fa987339d091f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>bb10
parent
a8df998290
commit
1b961e8b5d
|
|
@ -881,6 +881,13 @@
|
|||
# undef Q_COMPILER_RVALUE_REFS
|
||||
# undef Q_COMPILER_REF_QUALIFIERS
|
||||
# endif
|
||||
# if defined(_LIBCPP_VERSION)
|
||||
// libc++ uses __has_feature(cxx_atomic), so disable the feature if the compiler
|
||||
// doesn't support it. That's required for the Intel compiler on OS X, for example.
|
||||
# if !__has_feature(cxx_atomic)
|
||||
# undef Q_COMPILER_ATOMICS
|
||||
# endif
|
||||
# endif
|
||||
# if defined(Q_COMPILER_THREADSAFE_STATICS) && defined(Q_OS_MAC)
|
||||
// Mac OS X: Apple's low-level implementation of the C++ support library
|
||||
// (libc++abi.dylib, shared between libstdc++ and libc++) has deadlocks. The
|
||||
|
|
|
|||
Loading…
Reference in New Issue