summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Boni <boboniboni@gmail.com>2019-10-15 17:56:26 -0300
committerFrancisco Boni <boboniboni@gmail.com>2019-10-27 15:53:58 -0300
commita9b34f5726923babed448e2b4af42f117ae53ca4 (patch)
tree4ab9a97bfa9b250f9f09aa411b6cc33b7f52472a
parent7ac3bc9f830a8ea1ebdf4738e883bdc01522c31f (diff)
QRandom: add support for RDSEED on INTEL_ICL & MSVC
We set the macro for RDSEED because neither MSVC nor the Intel compiler on Windows defines the macro. The implication is that when qRandomCpu() calls qCpuHasFeature() in simd.cpp, qDetectCpuFeatures() correctly receives the expected CPU features enabled in the build from qCompilerCpuFeatures, namely CpuFeatureRDSEED (qsimd_x86_p.h) Change-Id: I5741d4f956a93f21c358af8a4ee393c1741b85ee Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--mkspecs/win32-icc/qmake.conf7
1 files changed, 6 insertions, 1 deletions
diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf
index 3cb0d58824..af26c5bc15 100644
--- a/mkspecs/win32-icc/qmake.conf
+++ b/mkspecs/win32-icc/qmake.conf
@@ -22,7 +22,7 @@ QMAKE_CFLAGS_WARN_OFF = -W0
QMAKE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_OPTIMIZE_DEBUG -Zi -MDd
QMAKE_CFLAGS_UTF8_SOURCE = -Qoption,cpp,--unicode_source_kind,UTF-8
QMAKE_CFLAGS_LTCG = -Qipo
-QMAKE_CFLAGS_DISABLE_LTCG = -Qno-ipo
+QMAKE_CFLAGS_DISABLE_LTCG = -Qipo-
QMAKE_CFLAGS_SSE2 = -QxSSE2
QMAKE_CFLAGS_SSE3 = -QxSSE3
@@ -39,6 +39,11 @@ QMAKE_CFLAGS_AVX512DQ += -QxCORE-AVX512
QMAKE_CFLAGS_AVX512BW += -QxCORE-AVX512
QMAKE_CFLAGS_AVX512VL += -QxCORE-AVX512
QMAKE_CFLAGS_F16C = $$QMAKE_CFLAGS_AVX2
+QMAKE_CFLAGS_RDRND = $$QMAKE_CFLAGS_AVX2
+# ICC on Windows lacks the mrdseed compiler option that sets the RDSEED macro
+QMAKE_CFLAGS_RDSEED = -D__RDSEED__=1
+QMAKE_CFLAGS_ARCH_HASWELL = $$QMAKE_CFLAGS_AVX2
+
QMAKE_CFLAGS_AESNI = -QxSSE2
QMAKE_CFLAGS_SHANI = -QxSSE4.2