diff options
author | Andreas Holzammer <andreas.holzammer@kdab.com> | 2016-02-10 13:05:26 +0100 |
---|---|---|
committer | Andreas Holzammer <andreas.holzammer@kdab.com> | 2016-02-11 12:54:06 +0000 |
commit | 7e85e7ced7079d620ae73f8664a68530992c6af1 (patch) | |
tree | cbf9665ac00132838a57afeeae976aa877b9a7af /tools/configure | |
parent | 9e8c84aa14ee26c04ab04ff28f0bab22e04887d6 (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 'tools/configure')
-rw-r--r-- | tools/configure/Makefile.win32 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/configure/Makefile.win32 b/tools/configure/Makefile.win32 index c83ecaaeea..17a758c795 100644 --- a/tools/configure/Makefile.win32 +++ b/tools/configure/Makefile.win32 @@ -2,11 +2,17 @@ CORESRC = $(QTSRC)src\corelib TOOLSRC = $(QTSRC)tools CONFSRC = $(TOOLSRC)\configure -PCH = configure_pch.pch DEFINES = -DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPONENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_VERSION_STR=\"$(QTVERSION)\" -DQT_VERSION_MAJOR=$(QT_VERSION_MAJOR) -DQT_VERSION_MINOR=$(QT_VERSION_MINOR) -DQT_VERSION_PATCH=$(QT_VERSION_PATCH) INCPATH = -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\$(QTVERSION)" -I"..\..\include\QtCore\$(QTVERSION)\QtCore" -I"$(TOOLSRC)\shared" -I"$(QTSRC)mkspecs\win32-msvc2012" CXXFLAGS_BARE = -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 -wd4577 $(CFLAGS_CRT) $(EXTRA_CXXFLAGS) $(DEFINES) $(INCPATH) +!IF ("$(CXX)" != "clang-cl") +PCH = configure_pch.pch +PCH_OBJECT = configure_pch.obj CXXFLAGS = -FIconfigure_pch.h -Yuconfigure_pch.h -Fp$(PCH) -MP $(CXXFLAGS_BARE) +!ELSE +PCH = +CXXFLAGS = -Wmicrosoft $(CXXFLAGS_BARE) +!ENDIF LINK = link LFLAGS = /NOLOGO /DYNAMICBASE /NXCOMPAT /INCREMENTAL:NO /SUBSYSTEM:CONSOLE "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST /MANIFESTFILE:"configure.intermediate.manifest" LIBS = ole32.lib advapi32.lib shell32.lib @@ -71,7 +77,7 @@ OBJECTS = \ qxmlutils.obj \ quuid.obj \ registry.obj \ - configure_pch.obj + $(PCH_OBJECT) $(TARGET): $(OBJECTS) $(LINK) $(LFLAGS) /OUT:$(TARGET) @<< |