[Qt-creator] Building qtcreator from git with debug symbols and without optimizations
Erik Verbruggen
erik.verbruggen at me.com
Fri Mar 30 10:19:22 CEST 2012
On 29-3-12 23:55, Martin Olsson wrote:
> Hi,
>
> I have found a reproducible crash bug in qtcreator and to file a good
> bug report I would like to see if the bug is available in the git
> master version and also obtain a stacktrace with symbols/variable
> present. For this reason I would like some help building qtcreator
> from git with debug symbols and without optimizations (i.e. -g3 -O0).
>
> QUESTION #1: Is it best to create a special "build" directory outside
> of the qt-creator git source tree or can I just run qmake inside the
> git source tree directly?
>
> QUESTION #2: Exactly which parameters should I pass to qmake and make
> to create a debug build with no optimizations?
>
> I've tried for example:
> git clean -dxf ; qmake -r -after CONFIG+=debug ; make -j4
>
> ...but this still passes -O2 (even though -g seems to be added).
When building libCPlusPlus.so/dylib, cplusplus.pro intentionally adds
-O2 when building for unix systems. The reason is that we can do a debug
build but still have decent parsing performance. (If we would not do
that, parsing could easily take 4x longer, if not more.)
This is only done for that specific library, so if the crash is not in
that area of the code, you can ignore that. If it is in that are, you
probably want to replace -O2 with something like -ggdb.
-- Erik.
More information about the Qt-creator
mailing list