[Interest] Optimizations in debug configuration

Allan Sandfeld Jensen kde at carewolf.com
Sat Sep 24 00:35:41 CEST 2016


On Friday 23 September 2016, Konstantin Shegunov wrote:
> On Fri, Sep 23, 2016 at 5:31 AM, Thiago Macieira
> <thiago.macieira at intel.com>
> 
> wrote:
> > The flag is not passed to the build.
> > 
> > Debug builds use -O0 on Linux.
> 
> I'm building a module and what I observe is getting -g -O2 for
> CONFIG+=debug. One thing I was able to infer was that
> setting QMAKE_CXXFLAGS to nothing seems to solve it for me. I wouldn't even
> dream of speculating why this is happening, it probably is my own
> configuration, albeit the qt3d module compiles with -g -O2 when I call
> qmake CONFIG+=debug on its root project file.

"-O2 -g" is only supposed to be used for release-with-debug-info, not debug. 
Maybe it is following Qt's configuration instead of the one you request 
locally. 

`Allan



More information about the Interest mailing list