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

Make optimization flags consistent for Release and RelWithDebInfo in relation to qmake

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 6.0.0
    • Build System: CMake

    Description

      As per https://gitlab.kitware.com/cmake/cmake/-/issues/20812

      1. CMake has some weird flag defaults for RelWithDebInfo on Windows, where it includes /INCREMENTAL which is a development feature, and increases binary size and is cache unfriendly.
      2. RelWithDebInfo on Windows also includes /Ob1, which disables automatic inlining
      3. We should use -O2 for both Release and RelWithDebInfo configs. With GCC / AppleClang, Release defaults to -O3, while RelWithDebInfo to -O2.
      4. In general we should make RelWithDebInfo be equal to Release + the debug generation flag.

      We aim to use RelWithDebInfo for Packaging configurations, so it's important to get them right.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-85992
          # Subject Branch Project Status CR V

          Activity

            People

              alexandru.croitor Alexandru Croitor
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes