How to compile QT with optimizations while producing debug symbols
-
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 -
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...
-
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
@