Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94400

/EHsc flag removal wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 6.1.0, 6.1.1
    • Fix Version/s: 6.1.2, 6.2.0 Alpha
    • Component/s: Build System: CMake
    • Labels:
      None
    • Platform/s:
      Windows
    • Commits:
      523ee5577a3fb1801dc765511c2c76753c10a72e (qt/qtbase/dev) f17d8982d7ca774a45b37f78a3d4cc3ce1042217 (qt/qtbase/6.2) a8dc7b7a1adc229f010151a789fb959d48a02ee7 (qt/qtbase/6.1)

      Description

      Toolchain says; 

       set(CMAKE_CXX_FLAGS " /nologo /DWIN32 /D_WINDOWS /W3 ${CHARSET_FLAG} /GR /EHsc /MP ${VCPKG_CXX_FLAGS}" CACHE STRING "")

       Qt does:

       /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR/MP /D_DEBUG /MTd /Z7 /RTC1 -MTd /W3

      with 

      cl : Command line warning D9002 : ignoring unknown option '/G/'
      cl : Command line warning D9002 : ignoring unknown option '/GM'
      cl : Command line warning D9002 : ignoring unknown option '/GP'

      Reason : qtbase/cmake/QtFLagHandlingHelpers.cmake

       

      qt_internal_remove_compiler_flags("(^| )/EH[scra-]*( |$)" LANGUAGES CXX CONFIGS ${configs} IN_CACHE REGEX)

      goes into

      qt_internal_remove_flags_impl

      which does:

      string(${replace_type} "${flag_value}" "" mod_flags "${mod_flags}")

      which needs to be

      string(${replace_type} "${flag_value}" " " mod_flags "${mod_flags}")

      to be correct!

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            semlanik Alexey Edelev
            Reporter:
            neumann-a Alexander Neumann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes