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

vcxproj generator must set optimization to "Disabled" if -Od command line is set in qmake.conf

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 4.8.0
    • Build tools: qmake
    • None
    • msvc2010

    Description

      By default win32-msvc2010/qmake.conf has QMAKE_CFLAGS_DEBUG set to "-Zi -MDd" and Qt compiles ok and vcxproj files generated are ok. However, if you set it to "-Zi -Mdd -Od" (disable optimization) the resulting vcxproj file leads to an incorrect vcxproj file as the optimization level remains O2.

      The fix is in msbuild_objectmodel.cpp: the static function "toString(optimizeOption option)" needs to return "Disabled" if option is "optimizeDisabled":

      static inline QString toString(optimizeOption option)
      {
          switch (option) {
          case optimizeMinSpace:
              return "MinSpace";
          case optimizeMaxSpeed:
              return "MaxSpeed";
          case optimizeDisabled:    // fixes problem where -Od is ignored
              return "Disabled";
          }
          return QString();
      }
      

      Attachments

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

        Activity

          People

            buddenha Oswald Buddenhagen
            andres Andres Kruse
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes