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>
This commit is contained in:
Friedemann Kleint 2018-08-23 13:16:15 +02:00
parent 96c202e981
commit 39cb9ac873
3 changed files with 3 additions and 8 deletions

View File

@ -16,7 +16,9 @@ MAKEFILE_GENERATOR = MSVC.NET
QMAKE_PLATFORM = win32 QMAKE_PLATFORM = win32
QMAKE_COMPILER = msvc QMAKE_COMPILER = msvc
CONFIG += flat debug_and_release debug_and_release_target precompile_header autogen_precompile_source embed_manifest_dll embed_manifest_exe 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 QMAKE_COMPILER_DEFINES += _WIN32
contains(QMAKE_TARGET.arch, x86_64) { contains(QMAKE_TARGET.arch, x86_64) {
DEFINES += WIN64 DEFINES += WIN64

View File

@ -110,12 +110,6 @@ greaterThan(QMAKE_MSC_VER, 1909) {
QMAKE_CXXFLAGS_CXX14 = -std:c++14 QMAKE_CXXFLAGS_CXX14 = -std:c++14
QMAKE_CXXFLAGS_CXX1Z = -std:c++17 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) { greaterThan(QMAKE_MSC_VER, 1910) {

View File

@ -12,7 +12,6 @@ include(../common/msvc-desktop.conf)
# modifications to msvc-desktop.conf # modifications to msvc-desktop.conf
QMAKE_COMPILER += intel_icl QMAKE_COMPILER += intel_icl
DEFINES += _ENABLE_EXTENDED_ALIGNED_STORAGE
QMAKE_CFLAGS_OPTIMIZE_FULL = -O3 QMAKE_CFLAGS_OPTIMIZE_FULL = -O3