summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2017-07-31 12:17:09 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2017-08-02 16:37:23 +0000
commitacf75d733708f2275cc363566c2457f5c4486362 (patch)
tree49e8a60b66d14a88e8abb42640845f9dcefb2b0a
parenta3b5020a1aee9f8d505b82ba70700518e5786686 (diff)
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>
-rw-r--r--src/corelib/arch/arch.pri2
-rw-r--r--src/corelib/arch/qatomic_cxx11.h2
-rw-r--r--src/corelib/configure.json17
3 files changed, 6 insertions, 15 deletions
diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri
index b628bcc6ec..e490617c6b 100644
--- a/src/corelib/arch/arch.pri
+++ b/src/corelib/arch/arch.pri
@@ -4,4 +4,4 @@ HEADERS += \
arch/qatomic_bootstrap.h \
arch/qatomic_cxx11.h
-qtConfig(libatomic): QMAKE_USE += libatomic
+qtConfig(std-atomic64): QMAKE_USE += libatomic
diff --git a/src/corelib/arch/qatomic_cxx11.h b/src/corelib/arch/qatomic_cxx11.h
index 484ec73e7f..1404849382 100644
--- a/src/corelib/arch/qatomic_cxx11.h
+++ b/src/corelib/arch/qatomic_cxx11.h
@@ -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
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index 0cbb35e688..67a1a2ad4b 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -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",