aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/configure.json
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-04-17 15:15:52 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-04-25 11:07:36 +0000
commit561a2cec9b95b22783a00b48078b532010357066 (patch)
tree117062debd9186c55cbe101a7d8da96210f0039c /src/qml/configure.json
parent8d9a7e47aaa03efe2d3eddfc9ac37d02a99affc7 (diff)
Transform V4_ENABLE_JIT into a feature
This way you can enable or disable the JIT when configuring Qt. The conditions for the availability of the JIT have also been cleaned up. There is no reason anymore to artificially restrict availability on x86 and x86_64. The reason for the existence of those clauses are old problems on windows that have been fixed by now. However, on arm and arm64, we need a specialization of the cacheFlush() function for each OS to be supported. Therefore, restrict to the systems for which such a specialization exists. iOS and tvOS are technically supported and you can enable the JIT via the feature flag now. Due to Apple's policy we disable it by default, though. Change-Id: I5fe2a2bf6799b2d11b7ae7c7a85962bcbf44f919 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/configure.json')
-rw-r--r--src/qml/configure.json69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/qml/configure.json b/src/qml/configure.json
index c35f5be06b..ef6a9f5e7e 100644
--- a/src/qml/configure.json
+++ b/src/qml/configure.json
@@ -24,6 +24,52 @@
],
"qmake": "CONFIG += c++11"
}
+ },
+ "pointer_32bit": {
+ "label": "32bit pointers",
+ "type": "compile",
+ "test": {
+ "main": "static_assert(sizeof(void *) == 4, \"fail\");"
+ }
+ },
+ "pointer_64bit": {
+ "label": "64bit pointers",
+ "type": "compile",
+ "test": {
+ "main": "static_assert(sizeof(void *) == 8, \"fail\");"
+ }
+ },
+ "arm_thumb": {
+ "label": "THUMB mode on ARM",
+ "type": "compile",
+ "test": {
+ "main": [
+ "#if defined(thumb2) || defined(__thumb2__)",
+ "# define THUMB_OK",
+ "#elif (defined(__thumb) || defined(__thumb__)) && __TARGET_ARCH_THUMB-0 == 4",
+ "# define THUMB_OK",
+ "#elif defined(__ARM_ARCH_ISA_THUMB) && __ARM_ARCH_ISA_THUMB == 2",
+ "// clang 3.5 and later will set this if the core supports the Thumb-2 ISA.",
+ "# define THUMB_OK",
+ "#else",
+ "# error \"fail\"",
+ "#endif"
+ ]
+ }
+ },
+ "arm_fp": {
+ "label": "Sufficiently recent FPU on ARM",
+ "type": "compile",
+ "test": {
+ "main": [
+ "// if !defined(__ARM_FP) we might be on MSVC or we might have a device",
+ "// without an FPU.",
+ "// TODO: The latter case is not supported, but the test still succeeds.",
+ "#if defined(__ARM_FP) && (__ARM_FP <= 0x04)",
+ "# error \"fail\"",
+ "#endif"
+ ]
+ }
}
},
@@ -40,10 +86,32 @@
"condition": "features.network",
"output": [ "publicFeature" ]
},
+ "qml-jit": {
+ "label": "QML just-in-time compiler",
+ "purpose": "Provides a JIT for QML and JavaScript",
+ "section": "QML",
+ "condition": [
+ " (arch.i386 && tests.pointer_32bit)
+ || (arch.x86_64 && tests.pointer_64bit)
+ || (arch.arm && tests.pointer_32bit && tests.arm_fp && tests.arm_thumb
+ && (config.linux || config.ios || config.tvos || config.qnx))
+ || (arch.arm64 && tests.pointer_64bit && tests.arm_fp
+ && (config.linux || config.ios || config.tvos || config.qnx || config.integrity))"
+ ],
+ "output": [ "privateFeature" ],
+ "autoDetect": "!config.ios && !config.tvos",
+ "comment": "On arm and arm64 we need a specialization of cacheFlush() for each OS to be
+ enabeled. Therefore the config white list.
+ Also Mind that e.g. x86_32 has arch.x86_64 but 32bit pointers. Therefore
+ the checks for architecture and pointer size.
+ Finally, ios and tvos can technically use the JIT but Apple does not allow
+ it. Therefore, it's disabled by default."
+ },
"qml-tracing": {
"label": "QML tracing JIT support",
"purpose": "Provides a JIT that uses trace information generated by the interpreter.",
"section": "QML",
+ "condition": "features.qml-jit",
"output": [ "privateFeature" ],
"autoDetect": false
},
@@ -140,6 +208,7 @@
"entries": [
"qml-network",
"qml-debug",
+ "qml-jit",
"qml-tracing",
"qml-sequence-object",
"qml-list-model",