Remove hard-coded MS compiler versions from the mkspecs
We're asking the compiler anyway, so we can fully use this information just as well. Note that this actually happens after the spec itself has been processed, so it was necessary to delay the version-specific flag handling as well. Change-Id: Ib57b52598e2f452985e9fffd14587b581d946022 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
5196d5602c
commit
4d9fbb3345
@ -3,10 +3,9 @@
|
||||
# This mkspec is used for all win32-msvcXXXX specs
|
||||
#
|
||||
|
||||
isEmpty(MSC_VER)|isEmpty(MSVC_VER): error("Source mkspec must set both MSC_VER and MSVC_VER.")
|
||||
|
||||
#
|
||||
# Baseline: Visual Studio 2005 (8.0), VC++ 14.0
|
||||
# Version-specific settings go in msvc-version.conf (loaded by default_pre)
|
||||
#
|
||||
|
||||
include(angle.conf)
|
||||
@ -105,7 +104,3 @@ QMAKE_RC = rc
|
||||
VCPROJ_EXTENSION = .vcproj
|
||||
VCSOLUTION_EXTENSION = .sln
|
||||
VCPROJ_KEYWORD = Qt4VSv1.0
|
||||
|
||||
include(msvc-base.conf)
|
||||
|
||||
unset(MSC_VER)
|
||||
|
@ -8,14 +8,20 @@
|
||||
# Version-specific changes
|
||||
#
|
||||
|
||||
greaterThan(MSC_VER, 1499) {
|
||||
isEmpty(QMAKE_MSC_VER): error("msvc-version.conf loaded but QMAKE_MSC_VER isn't set")
|
||||
|
||||
MSVC_VER = 8.0
|
||||
|
||||
greaterThan(QMAKE_MSC_VER, 1499) {
|
||||
# Visual Studio 2008 (9.0) / Visual C++ 15.0 and up
|
||||
MSVC_VER = 9.0
|
||||
QMAKE_CFLAGS_MP = -MP
|
||||
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1599) {
|
||||
greaterThan(QMAKE_MSC_VER, 1599) {
|
||||
# Visual Studio 2010 (10.0) / Visual C++ 16.0 and up
|
||||
MSVC_VER = 10.0
|
||||
MAKEFILE_GENERATOR = MSBUILD
|
||||
|
||||
QMAKE_CFLAGS_AVX = -arch:AVX
|
||||
@ -24,19 +30,21 @@ greaterThan(MSC_VER, 1599) {
|
||||
VCPROJ_EXTENSION = .vcxproj
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1699) {
|
||||
greaterThan(QMAKE_MSC_VER, 1699) {
|
||||
# Visual Studio 2012 (11.0) / Visual C++ 17.0 and up
|
||||
MSVC_VER = 11.0
|
||||
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0
|
||||
QT_CONFIG += c++11
|
||||
CONFIG += c++11
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1799) {
|
||||
greaterThan(QMAKE_MSC_VER, 1799) {
|
||||
# Visual Studio 2013 (12.0) / Visual C++ 18.0 and up
|
||||
MSVC_VER = 12.0
|
||||
QMAKE_CFLAGS += -FS
|
||||
QMAKE_CXXFLAGS += -FS
|
||||
|
||||
equals(MSC_VER, 1800) {
|
||||
equals(QMAKE_MSC_VER, 1800) {
|
||||
QMAKE_CFLAGS_RELEASE += -Zc:strictStrings
|
||||
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings
|
||||
QMAKE_CXXFLAGS_RELEASE += -Zc:strictStrings
|
||||
@ -44,11 +52,17 @@ greaterThan(MSC_VER, 1799) {
|
||||
}
|
||||
}
|
||||
|
||||
greaterThan(MSC_VER, 1899) {
|
||||
greaterThan(QMAKE_MSC_VER, 1899) {
|
||||
# Visual Studio 2015 (14.0) / Visual C++ 19.0 and up
|
||||
MSVC_VER = 14.0
|
||||
QMAKE_CFLAGS += -Zc:strictStrings
|
||||
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
|
||||
QMAKE_CFLAGS_AVX2 = -arch:AVX2
|
||||
QMAKE_CXXFLAGS += -Zc:strictStrings -Zc:throwingNew
|
||||
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577 -wd4467
|
||||
}
|
||||
|
||||
greaterThan(QMAKE_MSC_VER, 1909) {
|
||||
# Visual Studio 2017 (15.0) / Visual C++ 19.10 and up
|
||||
MSVC_VER = 15.0
|
||||
}
|
@ -97,8 +97,4 @@ WINRT_ASSETS_PATH = $$PWD/assets
|
||||
WINRT_MANIFEST.capabilities = defaults
|
||||
WINRT_MANIFEST.capabilities_device = defaults
|
||||
|
||||
include(../msvc-base.conf)
|
||||
|
||||
unset(MSC_VER)
|
||||
|
||||
load(qt_config)
|
||||
|
@ -1,3 +1,3 @@
|
||||
CONFIG = rtti_off incremental_off windows $$CONFIG
|
||||
load(default_pre)
|
||||
|
||||
msvc:!intel_icl:!clang_cl: include(../../common/msvc-version.conf)
|
||||
|
@ -6,8 +6,6 @@
|
||||
# Notice: this uses the clang-cl wrapper
|
||||
#
|
||||
|
||||
MSC_VER = 1900
|
||||
MSVC_VER = 14.0
|
||||
include(../common/msvc-desktop.conf)
|
||||
|
||||
QMAKE_COMPILER += clang_cl llvm
|
||||
|
@ -4,7 +4,5 @@
|
||||
# Written for Microsoft Visual C++ 2005
|
||||
#
|
||||
|
||||
MSC_VER = 1400
|
||||
MSVC_VER = 8.0
|
||||
include(../common/msvc-desktop.conf)
|
||||
load(qt_config)
|
||||
|
@ -4,7 +4,5 @@
|
||||
# Written for Microsoft Visual C++ 2008
|
||||
#
|
||||
|
||||
MSC_VER = 1500
|
||||
MSVC_VER = 9.0
|
||||
include(../common/msvc-desktop.conf)
|
||||
load(qt_config)
|
||||
|
@ -4,7 +4,5 @@
|
||||
# Written for Microsoft Visual C++ 2010
|
||||
#
|
||||
|
||||
MSC_VER = 1600
|
||||
MSVC_VER = 10.0
|
||||
include(../common/msvc-desktop.conf)
|
||||
load(qt_config)
|
||||
|
@ -4,7 +4,5 @@
|
||||
# Written for Microsoft Visual C++ 2012
|
||||
#
|
||||
|
||||
MSC_VER = 1700
|
||||
MSVC_VER = 11.0
|
||||
include(../common/msvc-desktop.conf)
|
||||
load(qt_config)
|
||||
|
@ -4,7 +4,5 @@
|
||||
# Written for Microsoft Visual C++ 2013
|
||||
#
|
||||
|
||||
MSC_VER = 1800
|
||||
MSVC_VER = 12.0
|
||||
include(../common/msvc-desktop.conf)
|
||||
load(qt_config)
|
||||
|
@ -4,7 +4,5 @@
|
||||
# Written for Microsoft Visual C++ 2015
|
||||
#
|
||||
|
||||
MSC_VER = 1900
|
||||
MSVC_VER = 14.0
|
||||
include(../common/msvc-desktop.conf)
|
||||
load(qt_config)
|
||||
|
@ -4,7 +4,5 @@
|
||||
# Written for Microsoft Visual C++ 2017
|
||||
#
|
||||
|
||||
MSC_VER = 1910
|
||||
MSVC_VER = 15.0
|
||||
include(../common/msvc-desktop.conf)
|
||||
load(qt_config)
|
||||
|
@ -16,7 +16,6 @@ QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
|
||||
QMAKE_LIBS += WindowsPhoneCore.lib PhoneAppModelHost.lib
|
||||
|
||||
VCPROJ_ARCH = ARM
|
||||
MSVC_VER = 12.0
|
||||
WINSDK_VER = 8.1
|
||||
WINTARGET_VER = WP81
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in
|
||||
|
@ -16,7 +16,6 @@ QMAKE_LFLAGS += /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
|
||||
QMAKE_LIBS += WindowsPhoneCore.lib PhoneAppModelHost.lib
|
||||
|
||||
VCPROJ_ARCH = Win32
|
||||
MSVC_VER = 12.0
|
||||
WINSDK_VER = 8.1
|
||||
WINTARGET_VER = WP81
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1_wp/AppxManifest.xml.in
|
||||
|
@ -14,7 +14,6 @@ QMAKE_LFLAGS += /MACHINE:ARM
|
||||
QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
|
||||
|
||||
VCPROJ_ARCH = ARM
|
||||
MSVC_VER = 12.0
|
||||
WINSDK_VER = 8.1
|
||||
WINTARGET_VER = winv6.3
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1/AppxManifest.xml.in
|
||||
|
@ -4,7 +4,6 @@
|
||||
# Written for Microsoft Visual C++ 2015
|
||||
#
|
||||
|
||||
MSC_VER = 1900
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 ARM __ARM__ __arm__
|
||||
|
||||
@ -15,7 +14,6 @@ QMAKE_LFLAGS += /MACHINE:ARM /NODEFAULTLIB:kernel32.lib
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
|
||||
VCPROJ_ARCH = ARM
|
||||
MSVC_VER = 14.0
|
||||
WINSDK_VER = 10.0
|
||||
WINTARGET_VER = winv10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
|
@ -14,7 +14,6 @@ QMAKE_LFLAGS += /MACHINE:X64
|
||||
QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
|
||||
|
||||
VCPROJ_ARCH = x64
|
||||
MSVC_VER = 12.0
|
||||
WINSDK_VER = 8.1
|
||||
WINTARGET_VER = winv6.3
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1/AppxManifest.xml.in
|
||||
|
@ -4,7 +4,6 @@
|
||||
# Written for Microsoft Visual C++ 2015
|
||||
#
|
||||
|
||||
MSC_VER = 1900
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
QMAKE_COMPILER_DEFINES += _WIN32
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X64 __X64__ __x64__
|
||||
@ -16,7 +15,6 @@ QMAKE_LFLAGS += /MACHINE:X64 /NODEFAULTLIB:kernel32.lib
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
|
||||
VCPROJ_ARCH = x64
|
||||
MSVC_VER = 14.0
|
||||
WINSDK_VER = 10.0
|
||||
WINTARGET_VER = winv10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
|
@ -15,7 +15,6 @@ QMAKE_LFLAGS += /SAFESEH /MACHINE:X86
|
||||
QMAKE_LIBS += windowscodecs.lib kernel32.lib ole32.lib
|
||||
|
||||
VCPROJ_ARCH = Win32
|
||||
MSVC_VER = 12.0
|
||||
WINSDK_VER = 8.1
|
||||
WINTARGET_VER = winv6.3
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/8.1/AppxManifest.xml.in
|
||||
|
@ -4,7 +4,6 @@
|
||||
# Written for Microsoft Visual C++ 2015
|
||||
#
|
||||
|
||||
MSC_VER = 1900
|
||||
include(../common/winrt_winphone/qmake.conf)
|
||||
QMAKE_COMPILER_DEFINES += _WIN32
|
||||
DEFINES += WINAPI_FAMILY=WINAPI_FAMILY_PC_APP WINAPI_PARTITION_PHONE_APP=1 X86 __X86__ __x86__
|
||||
@ -15,7 +14,6 @@ QMAKE_LFLAGS += /SAFESEH /MACHINE:X86 /NODEFAULTLIB:kernel32.lib
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib OneCore.lib
|
||||
VCPROJ_ARCH = Win32
|
||||
MSVC_VER = 14.0
|
||||
WINSDK_VER = 10.0
|
||||
WINTARGET_VER = winv10.0
|
||||
WINRT_MANIFEST = $$PWD/../common/winrt_winphone/manifests/10.0/AppxManifest.xml.in
|
||||
|
Loading…
Reference in New Issue
Block a user