summaryrefslogtreecommitdiffstats
path: root/configure.bat
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-07-18 16:41:41 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-07-21 00:16:04 +0000
commit8e4c8be0b9821ee2f3dbdda3ebbe16126d334959 (patch)
tree4618cd272be3afdbf3889d20ed3f1a457a7b7b7e /configure.bat
parentaeb36d5292abd979b9c064877f3ed1b4da961c4e (diff)
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 <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'configure.bat')
-rw-r--r--configure.bat12
1 files changed, 6 insertions, 6 deletions
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