summaryrefslogtreecommitdiffstats
path: root/configure.bat
diff options
context:
space:
mode:
authorAndreas Holzammer <andreas.holzammer@kdab.com>2016-02-10 13:05:26 +0100
committerAndreas Holzammer <andreas.holzammer@kdab.com>2016-02-11 12:54:06 +0000
commit7e85e7ced7079d620ae73f8664a68530992c6af1 (patch)
treecbf9665ac00132838a57afeeae976aa877b9a7af /configure.bat
parent9e8c84aa14ee26c04ab04ff28f0bab22e04887d6 (diff)
Add initial clang-cl support to Qt
This adds the functionality to build Qt with clang under Windows against the Microsoft Visual Studio 2015 runtime. In order to replicate this, a Clang 3.8 build with Visual Studio 2015 Update 1 is needed. Adds compiler detection to Qt to distinguish correctly the clang compiler and Windows with Visual Studio. Clang has some built-in numeric functions, there is no need to use the Microsoft versions, which also conflict here. Task-number: QTBUG-50804 Change-Id: Ia4b267a298310ac7d73edf473b12792991249d8a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'configure.bat')
-rw-r--r--configure.bat8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.bat b/configure.bat
index ecb1518f66..372b3faac5 100644
--- a/configure.bat
+++ b/configure.bat
@@ -34,7 +34,7 @@ set QTDIR=%CD%
if not exist %QTSRC%.gitignore goto sconf
echo Please wait while bootstrapping configure ...
-for %%C in (cl.exe icl.exe g++.exe perl.exe jom.exe) do set %%C=%%~$PATH:C
+for %%C in (clang-cl.exe cl.exe icl.exe g++.exe perl.exe jom.exe) do set %%C=%%~$PATH:C
if "%perl.exe%" == "" (
echo Perl not found in PATH. Aborting. >&2
@@ -81,6 +81,12 @@ 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