summaryrefslogtreecommitdiffstats
path: root/configure.json
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-09-05 17:50:17 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-09-30 20:05:42 +0200
commit4bd6cd1992fdcdc933861ba646ea9da870670237 (patch)
tree55940f60c88352427f55f215d9970dbbbe97c174 /configure.json
parent86876744f07cbaa01daca6869b896741878c39a3 (diff)
Featurize support for signaling NaN
One of our compilers for emscripten coerces all signaling NaNs to quiet ones, so won't do any actual signaling. Anyone relying on them to do so shall be disappointed, so it's better that they know about it at compile-time - or, at least, have the ability to find it out. Put the signaling NaN producers (and remaining (test) code using them) under the control of a feature that's disabled when numeric_limits claims double has no signaling NaN. Assume the bootstrap library doesn't need signaling NaNs. Sadly, until C++20 <bit>, there's no contexpr way to test that alleged signalling and quiet NaNs are actually distinct. Added some auto-tests for signaling NaN, including that it's distinct from quiet NaN. Any platform on which the last fails should disable this feature. Task-number: QTBUG-77967 Change-Id: I57e9d14bfe276732cd313887adc9acc354d88f08 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'configure.json')
-rw-r--r--configure.json16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.json b/configure.json
index 5ee27fec62..70ad9440c8 100644
--- a/configure.json
+++ b/configure.json
@@ -484,6 +484,17 @@
]
}
},
+ "signaling_nan": {
+ "label": "Signaling NaN for doubles",
+ "type": "compile",
+ "test": {
+ "head": [ "#include <limits>" ],
+ "main": [
+ "using B = std::numeric_limits<double>;",
+ "static_assert(B::has_signaling_NaN, \"System lacks signaling NaN\");"
+ ]
+ }
+ },
"sse2": {
"label": "SSE2 instructions",
"type": "x86Simd"
@@ -1005,6 +1016,11 @@
{ "type": "define", "name": "QT_REDUCE_RELOCATIONS" }
]
},
+ "signaling_nan": {
+ "label": "Signaling NaN",
+ "condition": "tests.signaling_nan",
+ "output": [ "publicFeature" ]
+ },
"sse2": {
"label": "SSE2",
"condition": "(arch.i386 || arch.x86_64) && tests.sse2",