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>
This commit is contained in:
parent
aeb36d5292
commit
8e4c8be0b9
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user