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

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

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes