From 8e4c8be0b9821ee2f3dbdda3ebbe16126d334959 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 18 Jul 2016 16:41:41 -0700 Subject: Don't compile configure.exe with clang-cl.exe if cl.exe is available Sometimes clang-cl.exe is on PATH and would get picked up by the build. That is often by mistake, but it will inreasingly happen as clang-cl becomes more popular. Unfortunately, configure.bat is too early to detect which MSVC version it's set to compile against, so the -fms-compatibility-version option will often be wrong. One such case is when trying to build for MSVC 2013. Microsoft headers for VS2013 are unsuitable for our use in Qt with clang-cl. Instead, use cl.exe. It's a much better-known quantity and is always on PATH if trying to build with clang-cl, as the latter needs the former to fall back to if necessary. This does not affect the build of Qt libraries and tools. Task-number: QTBUG-51534 Change-Id: I149e0540c00745fe8119fffd146287662436c4b9 Reviewed-by: Oswald Buddenhagen --- configure.bat | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'configure.bat') diff --git a/configure.bat b/configure.bat index 1cbd733531..5c01890116 100644 --- a/configure.bat +++ b/configure.bat @@ -81,18 +81,18 @@ if not "%icl.exe%" == "" ( rem This must have a trailing space. echo QTSRC = %QTSRC% >> Makefile set tmpl=win32 -) else if not "%clang-cl.exe%" == "" ( - echo CXX = clang-cl>>Makefile - echo EXTRA_CXXFLAGS = -fms-compatibility-version=19.00.23506 -Wno-microsoft-enum-value>>Makefile - rem This must have a trailing space. - echo QTSRC = %QTSRC% >> Makefile - set tmpl=win32 ) else if not "%cl.exe%" == "" ( echo CXX = cl>>Makefile echo EXTRA_CXXFLAGS =>>Makefile rem This must have a trailing space. echo QTSRC = %QTSRC% >> Makefile set tmpl=win32 +) else if not "%clang-cl.exe%" == "" ( + echo CXX = clang-cl>>Makefile + echo EXTRA_CXXFLAGS = -fms-compatibility-version=19.00.23506 -Wno-microsoft-enum-value>>Makefile + rem This must have a trailing space. + echo QTSRC = %QTSRC% >> Makefile + set tmpl=win32 ) else if not "%g++.exe%" == "" ( echo CXX = g++>>Makefile echo EXTRA_CXXFLAGS =>>Makefile -- cgit v1.2.3