Make qsimd.cpp also complain if required features are missing
authorThiago Macieira <thiago.macieira@intel.com>
Sat, 31 Dec 2011 02:16:13 +0000 (00:16 -0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 28 Mar 2012 20:32:40 +0000 (22:32 +0200)
commitcc3ff3c1f6aa22de4fc70e741400d05d1a961af5
tree6bd230d5548f6ba5aa05a11e52654a2a97426ac7
parentcbe8c1014621e863c95ffc856d87a3cff12ec608
Make qsimd.cpp also complain if required features are missing

Record in a variable the features that the compiler used for code
generation when Qt was compiled. Then complain if those are
missing. This is required in qdrawhelper_plain.cpp to make it disable
the plain build, keeping only the AVX, Neon or SSE2 builds. This code
works for GCC, ICC on Unix and Clang.

MSVC support is pending. It will involve defining the same macros
from qsimd_p.h when the compiler support is detected.

Other compilers are unknown. The only relevant one would be Sun Studio
for x86, but I have no access to it to find out what macros it
predefines.

Change-Id: I25f2d90b3c7ac7bd0442f4b349b6ee3bd751a95b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/corelib/tools/qsimd.cpp