Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21604

Change MSVC compatibilty for clang-cl

XMLWordPrintable

    • Windows
    • 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.

        1. image-2018-11-29-10-23-36-434.png
          10 kB
          Julius Bullinger
        2. QTCREATORBUG-21604.gif
          329 kB
          Julius Bullinger
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            yvvan Ivan Donchevskii
            VersalEszett Julius Bullinger
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes