-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
Qt Creator 4.8.0-rc1
-
None
-
-
4c191572044d4483f09b3b8d0f76ef164bd8f225 (qt-creator/qt-creator/master)
clang-cl supports different MSVC compatibility settings that can be set via -fms-compatibility. clang seems to also support autodetection based on the version of a found cl.exe (see https://reviews.llvm.org/D20136).
However, Qt Creator hardcodes the MSVC initialization script to some (the latest?) MSVC version:
It would be great if we could change the compatibilty, either globally or even per project.
We manually set compatibility in our *.pro file like that:
contains(QMAKE_CXX,clang-cl) {
{{ win32 { }}
{{ QMAKE_CXXFLAGS+=-fms-compatibility}}
{{ QMAKE_CXXFLAGS+=-fms-compatibility-version=18.00.31101}}
{{ { }}
{{{ }}
That work, but it will still include the system headers from MSVC2017, which can result in very strange behaviour/compile time errors.