summaryrefslogtreecommitdiffstats
path: root/cmake/QtCompilerOptimization.cmake
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-07-09 14:16:23 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-07-09 23:02:39 +0200
commit60d72b7ab6b08a43248764ddc7b710fc757a3e5a (patch)
tree57b9e544935323d6dfa2de279ffd7a201a34a6ea /cmake/QtCompilerOptimization.cmake
parentf9e167409486998b76cedd8ce50ca1381bcd6e6a (diff)
CMake: Fix incorrect SIMD arch_haswell and avx profile conditions
Fix the conditions in qt_add_simd_part for arch_haswell and the avx512 profiles to mimic what simd.prf does. Add missing SIMD flags in QtCompilerOptimization for arch_haswell. Compute the compile flags for the avx512 profiles from the profile dependencies. Remove the special case in Gui that hardcoded the compilation of qdrawhelper_avx2.cpp to be conditional on avx2 being enabled instead of arch_haswell. The Gui project already has another qt_add_simd_part that is enabled if arch_haswell is enabled, which will now work correctly due to the fixes in qt_add_simd_part. Change-Id: I7a61a03b5565d4fa438f22b329e0d9dd7acd9273 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtCompilerOptimization.cmake')
-rw-r--r--cmake/QtCompilerOptimization.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/QtCompilerOptimization.cmake b/cmake/QtCompilerOptimization.cmake
index 42206368d9..fc2922089c 100644
--- a/cmake/QtCompilerOptimization.cmake
+++ b/cmake/QtCompilerOptimization.cmake
@@ -51,6 +51,7 @@ if(GCC OR CLANG)
set(QT_CFLAGS_RDRND "-mrdrnd")
set(QT_CFLAGS_AVX "-mavx")
set(QT_CFLAGS_AVX2 "-mavx2")
+ set(QT_CFLAGS_ARCH_HASWELL "-march=core-avx2")
set(QT_CFLAGS_AVX512F "-mavx512f")
set(QT_CFLAGS_AVX512ER "-mavx512er")
set(QT_CFLAGS_AVX512CD "-mavx512cd")