configure: standardize handling of 64 bit atomics

replace the custom QT_NO_STD_ATOMIC64 with a regular public feature, and
give libatomic an empty source rather than using a separate config test.

Change-Id: Iaf4a7f4c4874f61bf93aa58fe41843a86baf1ab7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Oswald Buddenhagen 2017-07-31 12:17:09 +02:00 committed by Simon Hausmann
parent a3b5020a1a
commit acf75d7337
3 changed files with 6 additions and 15 deletions

View File

@ -4,4 +4,4 @@ HEADERS += \
arch/qatomic_bootstrap.h \
arch/qatomic_cxx11.h
qtConfig(libatomic): QMAKE_USE += libatomic
qtConfig(std-atomic64): QMAKE_USE += libatomic

View File

@ -187,7 +187,7 @@ template <> Q_DECL_CONSTEXPR inline bool QAtomicTraits<2>::isLockFree()
{ return false; }
#endif
#ifndef QT_NO_STD_ATOMIC64
#if QT_CONFIG(std_atomic64)
template<> struct QAtomicOpsSupport<8> { enum { IsSupported = 1 }; };
# define Q_ATOMIC_INT64_IS_SUPPORTED
# if ATOMIC_LLONG_LOCK_FREE == 2

View File

@ -69,9 +69,10 @@
]
},
"libatomic": {
"label": "64 bit atomics in libatomic",
"label": "64 bit atomics",
"test": "common/atomic64",
"sources": [
"",
"-latomic"
]
},
@ -116,11 +117,6 @@
},
"tests": {
"atomic64": {
"label": "64 bit atomics",
"type": "compile",
"test": "common/atomic64"
},
"atomicfptr": {
"label": "working std::atomic for function pointers",
"type": "compile",
@ -284,13 +280,8 @@
},
"std-atomic64": {
"label": "64 bit atomic operations",
"condition": "tests.atomic64 || libs.libatomic",
"output": [ { "type": "define", "negative": true, "name": "QT_NO_STD_ATOMIC64" } ]
},
"libatomic": {
"label": "64 bit atomic operations in libatomic",
"condition": "!tests.atomic64 && libs.libatomic",
"output": [ "privateFeature" ]
"condition": "libs.libatomic",
"output": [ "publicFeature" ]
},
"mimetype": {
"label": "Mimetype handling",