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

Enabling Link time optimization for GCC (MinGW64) removes resources from exe

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.4.0 Alpha
    • 5.4.0 Beta
    • Build System
    • None
    • Windows 7 64-bit and Qt 5.4 beta MinGW bundle

    Description

      Found this little thing today.

      Adding the following optimization flags to .pro file will remove resources from compiled .exe file:

      QMAKE_CXXFLAGS += -flto
      QMAKE_LFLAGS += -fuse-linker-plugin -flto

      If my memory works correctly, this optimization still worked with Qt 5.2.1 mingw bundle, but that must have had an older gcc version??

      So is this a compiler bug or Qt bug ?

      How to reproduce:

      • Compile and run the attached test project. Small adobe pdf icon should not be shown on the button.
      • Now, comment out the above to environment flags from .pro file, clean the project, recompile & run. adobe pdf icon should appear on the button.

      Attachments

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

        Activity

          People

            buddenha Oswald Buddenhagen
            crazythinker Stefan Fröberg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes