summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-08-23 13:16:15 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-08-24 12:00:43 +0000
commit39cb9ac873cc9b6f829238142c1efa11f6a51fda (patch)
tree847c31956fff7d7f397e63fe4a8cc249b0fae041 /mkspecs
parent96c202e981346b9159fe9652676753d14a9dfaf4 (diff)
Fix qtbase build for clang-cl with MSVC 2017 15.8
Move the definition of _ENABLE_EXTENDED_ALIGNED_STORAGE to msvc-desktop.conf so that it becomes effective for all compilers using MSVC (icc, clang-cl). Task-number: QTBUG-50804 Change-Id: I5ff612cc0f5a712b855925f9bcf645e578e80504 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/msvc-desktop.conf4
-rw-r--r--mkspecs/common/msvc-version.conf6
-rw-r--r--mkspecs/win32-icc/qmake.conf1
3 files changed, 3 insertions, 8 deletions
diff --git a/mkspecs/common/msvc-desktop.conf b/mkspecs/common/msvc-desktop.conf
index b7d2eecc82..a4fadeb029 100644
--- a/mkspecs/common/msvc-desktop.conf
+++ b/mkspecs/common/msvc-desktop.conf
@@ -16,7 +16,9 @@ MAKEFILE_GENERATOR = MSVC.NET
QMAKE_PLATFORM = win32
QMAKE_COMPILER = msvc
CONFIG += flat debug_and_release debug_and_release_target precompile_header autogen_precompile_source embed_manifest_dll embed_manifest_exe
-DEFINES += UNICODE _UNICODE WIN32
+# MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without
+# _ENABLE_EXTENDED_ALIGNED_STORAGE flag since the fix breaks binary compatibility.
+DEFINES += UNICODE _UNICODE WIN32 _ENABLE_EXTENDED_ALIGNED_STORAGE
QMAKE_COMPILER_DEFINES += _WIN32
contains(QMAKE_TARGET.arch, x86_64) {
DEFINES += WIN64
diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf
index 5805383a04..3fb55c9d81 100644
--- a/mkspecs/common/msvc-version.conf
+++ b/mkspecs/common/msvc-version.conf
@@ -110,12 +110,6 @@ greaterThan(QMAKE_MSC_VER, 1909) {
QMAKE_CXXFLAGS_CXX14 = -std:c++14
QMAKE_CXXFLAGS_CXX1Z = -std:c++17
}
-
- # MSVC 2017 15.8+ fixed std::aligned_storage but compilation fails without
- # this flag since the fix breaks binary compatibility.
- greaterThan(QMAKE_MSC_VER, 1914) {
- DEFINES += _ENABLE_EXTENDED_ALIGNED_STORAGE
- }
}
greaterThan(QMAKE_MSC_VER, 1910) {
diff --git a/mkspecs/win32-icc/qmake.conf b/mkspecs/win32-icc/qmake.conf
index 2447c712b1..3cb0d58824 100644
--- a/mkspecs/win32-icc/qmake.conf
+++ b/mkspecs/win32-icc/qmake.conf
@@ -12,7 +12,6 @@ include(../common/msvc-desktop.conf)
# modifications to msvc-desktop.conf
QMAKE_COMPILER += intel_icl
-DEFINES += _ENABLE_EXTENDED_ALIGNED_STORAGE
QMAKE_CFLAGS_OPTIMIZE_FULL = -O3