Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to compile QT with optimizations while producing debug symbols
Forum Updated to NodeBB v4.3 + New Features

How to compile QT with optimizations while producing debug symbols

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 5.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tpatja
    wrote on last edited by
    #1

    Hi,

    I am looking for way to generate breakpad-compatible symbols for the QT libraries.

    The configure script provided with the free version of QT 4.8 seems not to be able to compile on windows with optimizations enabled while producing .pdb files for each dll. Same with OSX, we can only get symbols in the binaries when building in debug mode.

    CMake has a build type called "RelWithDebInfo" which has this behavior.

    I want to compile the QT libs with symbols included and optimizations enabled, and then run dump_syms on the non-stripped binaries to produce the breakpad-compatible .sym files and finally strip out the debug symbols from the binaries.

    Is there 1) some option I'm not aware of in the current configure script? 2) some simple way to patch the current build system to allow this? or 2) existing CMake files for the QT sources?

    Thanks,
    teemu

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tpatja
      wrote on last edited by
      #2

      This wiki page solved my problem for windows: "http://qt-project.org/faq/answer/how_to_build_pdb_for_release_version_of_qt":http://qt-project.org/faq/answer/how_to_build_pdb_for_release_version_of_qt.

      Still need a solution for OSX...

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #3

        Just note that in Qt5, libraries will not be stripped by default.

        As for OSX, I don't know the flags, but you can definitely check available flags with:
        @
        man g++
        man clang
        @

        (Z(:^

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tpatja
          wrote on last edited by
          #4

          It seems one can define "-g" in addition to -O2 for the QMAKE_CFLAGS_RELEASE in mkspecs/common/gcc-base.conf. That will change the release mode building to include symbols for all unix-like platforms, like OSX, that use gcc or llvm.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved