Commit 1b961e8b authored by Thiago Macieira's avatar Thiago Macieira
Browse files

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: default avatarOlivier Goffart <ogoffart@woboq.com>
Showing with 7 additions and 0 deletions
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment