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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 6.0.0
    • Fix Version/s: None
    • Component/s: Build System: CMake
    • Labels:

      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

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

            Activity

              People

              Assignee:
              alexandru.croitor Alexandru Croitor
              Reporter:
              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