From ba7c62eed53b2304c54643cbddc29db887fcd869 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 21 Mar 2019 13:14:09 +0100 Subject: Fix sub-architecture (instruction sets / SIMD) handling In qmake there are at least 2 things to know regarding sub-architectures and instruction sets. Which instruction sets does the compiler know to compile for, represented by the various config.tests and features in qtbase/configure.json. And which instructions sets are enabled by the compiler by default, represented by the configure.json "architecture" test and accessed via QT_CPU_FEATURES.$$arch qmake argument. Before this patch there was some mishandling of the above concepts in CMake code. The former can now be checked in CMake with via TEST_subarch_foo and QT_FEATURE_foo (where foo is sse2, etc). The latter can now be checked by TEST_arch_${TEST_architecture_arch}_subarch_foo (where foo is sse2, etc and the main arch is dynamyicall evaluated). The configurejson2cmake script was adjusted to take care of the above changes, and the cmake files were regenerated as well. Change-Id: Ifbf558242e320cafae50da388eee56fa5de2a50c Reviewed-by: Simon Hausmann --- configure.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'configure.cmake') diff --git a/configure.cmake b/configure.cmake index c12b7d3b87..a62a746916 100644 --- a/configure.cmake +++ b/configure.cmake @@ -336,17 +336,17 @@ qt_feature("x86SimdAlways" qt_feature_definition("x86SimdAlways" "QT_COMPILER_SUPPORTS_SIMD_ALWAYS" VALUE "1") qt_feature("mips_dsp" LABEL "DSP" - CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_subarch_dsp + CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_arch_${TEST_architecture_arch}_subarch_dsp ) qt_feature_definition("mips_dsp" "QT_COMPILER_SUPPORTS_MIPS_DSP" VALUE "1") qt_feature("mips_dspr2" LABEL "DSPr2" - CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_subarch_dspr2 + CONDITION ( TEST_architecture_arch STREQUAL mips ) AND TEST_arch_${TEST_architecture_arch}_subarch_dspr2 ) qt_feature_definition("mips_dspr2" "QT_COMPILER_SUPPORTS_MIPS_DSPR2" VALUE "1") qt_feature("neon" LABEL "NEON" - CONDITION ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND TEST_subarch_neon + CONDITION ( ( TEST_architecture_arch STREQUAL arm ) OR ( TEST_architecture_arch STREQUAL arm64 ) ) AND TEST_arch_${TEST_architecture_arch}_subarch_neon ) qt_feature_definition("neon" "QT_COMPILER_SUPPORTS_NEON" VALUE "1") qt_feature("alloca_h" PRIVATE -- cgit v1.2.3