From 7e85e7ced7079d620ae73f8664a68530992c6af1 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Wed, 10 Feb 2016 13:05:26 +0100 Subject: 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 Reviewed-by: Friedemann Kleint --- configure.bat | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'configure.bat') 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 -- cgit v1.2.3