diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-11-15 21:01:15 -0800 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-11-30 08:30:40 +0000 |
commit | a09fc184acd0874ea9876cdb2c4b123b226d8587 (patch) | |
tree | c3808834554d1de1411ef115863dc60482551c76 /configure.json | |
parent | ff1ffa7577ba88412daf9904bbc1e4de9e024436 (diff) |
Add a configure-time check for QT_COMPILER_SUPPORTS_SIMD_ALWAYS
This has two main benefits:
1) introduces a qmake CONFIG we can use in .pro/.pri/.prf files
2) removes the need to keep an up-to-date list of which compilers
support the feature
The test is implemented as trying to compile every single SIMD test we
currently have, but without passing the -mXXX option. The reason for
trying all of them is that some people may have modified their mkspecs
to add -mXXX options or -march=XXX, which could enable the particular
feature we tried, resulting in a false positive outcome.
Change-Id: I938b024e38bf4aac9154fffd14f7784dc8d1f020
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'configure.json')
-rw-r--r-- | configure.json | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/configure.json b/configure.json index 07549e0b7e..9ae3cc284a 100644 --- a/configure.json +++ b/configure.json @@ -218,7 +218,7 @@ }, "testTypeAliases": { - "compile": [ "library", "architecture" ] + "compile": [ "library", "architecture", "x86SimdAlways" ] }, "tests": { @@ -563,6 +563,11 @@ "test": "avx512", "args": "AVX512=VBMI" }, + "x86SimdAlways": { + "label": "Intrinsics without -mXXX argument", + "type": "x86SimdAlways", + "test": "x86_simd" + }, "mips_dsp": { "label": "MIPS DSP instructions", "type": "subarch", @@ -1111,6 +1116,14 @@ { "type": "define", "name": "QT_COMPILER_SUPPORTS_SHA", "value": 1 } ] }, + "x86SimdAlways": { + "label": "Intrinsics without -mXXX option", + "condition": "(arch.i386 || arch.x86_64) && tests.x86SimdAlways", + "output": [ + "privateConfig", + { "type": "define", "name": "QT_COMPILER_SUPPORTS_SIMD_ALWAYS", "value": 1 } + ] + }, "mips_dsp": { "label": "DSP", "condition": "arch.mips && tests.mips_dsp", @@ -1399,6 +1412,11 @@ Configure with '-qreal float' to create a build that is binary-compatible with 5 }, { "type": "feature", + "args": "x86SimdAlways", + "condition": "(arch.i386 || arch.x86_64) && !config.msvc" + }, + { + "type": "feature", "args": "neon", "condition": "arch.arm || arch.arm64" }, |