summaryrefslogtreecommitdiffstats
path: root/config.tests/x86_simd
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests/x86_simd')
-rw-r--r--config.tests/x86_simd/main.cpp2
-rw-r--r--config.tests/x86_simd/x86_simd.pro6
2 files changed, 7 insertions, 1 deletions
diff --git a/config.tests/x86_simd/main.cpp b/config.tests/x86_simd/main.cpp
index 6005f5b023..8120cb9d3f 100644
--- a/config.tests/x86_simd/main.cpp
+++ b/config.tests/x86_simd/main.cpp
@@ -41,7 +41,7 @@
#include <immintrin.h>
#define T(x) (QT_COMPILER_SUPPORTS_ ## x)
-#if !defined(__INTEL_COMPILER) && !defined(_MSC_VER)
+#if !defined(__INTEL_COMPILER) && !defined(_MSC_VER) && !defined(NO_ATTRIBUTE)
/* GCC requires attributes for a function */
# define attribute_target(x) __attribute__((__target__(x)))
#else
diff --git a/config.tests/x86_simd/x86_simd.pro b/config.tests/x86_simd/x86_simd.pro
index 52c24c24a8..5751432980 100644
--- a/config.tests/x86_simd/x86_simd.pro
+++ b/config.tests/x86_simd/x86_simd.pro
@@ -2,4 +2,10 @@ SOURCES = main.cpp
for (config, SIMD) {
uc = $$upper($$config)
DEFINES += QT_COMPILER_SUPPORTS_$${uc}
+
+ add_cflags {
+ cflags = QMAKE_CFLAGS_$${uc}
+ !defined($$cflags, var): error("This compiler does not support $${uc}")
+ QMAKE_CXXFLAGS += $$eval($$cflags)
+ }
}