debug libs (Re: KDE/kdelibs/cmake/modules)

Nicolas Goutte nicolasg at snafu.de
Tue Feb 28 18:56:58 GMT 2006


On Tuesday 28 February 2006 19:37, David Faure wrote:
> On Tuesday 28 February 2006 19:23, Alexander Neundorf wrote:
> > SVN commit 514550 by neundorf:
> >
> > -set CMAKE_DEBUG_POSTFIX to "_debug", this has the effect that when doing
> > a debug build e.g. kdecore will be named "libkdecore_debug.so"
>
> Hmm. Hmm. Do we really want that, on unix?

> I can't understand why Qt4 went that route,

Because it is standard for MSVC, probably.

And MSVC introduces it with the incremental compiling. To be able to do so (in 
Debug mode), the code is filled with filling opcodes to be able to replace 
them with jumps for new code. Of course, if you ship such codes to (paying) 
clients (which has happened), you release large and slow code. That is where 
the release mode comes, where you use full compile (not incremental) and 
where you can use code optimization (typically what gcc calls -Os).

The two modes have also the advantage of the possibilty to set different 
warning levels (like /W4 on debug for everything, but /W2 on release for only 
error and serious warnings (That is alo where you can use what gcc calls 
-Werror.)

So that is the history. I do not know if MSVC still does so.

As for gcc, the only advantage would be that using -O2 creates warnings that 
-O0 does not.

> but IMHO not being able to
> replace release libs by debug libs (without relinking all kde apps) is a
> real problem.
(...)

Have a nice day!





More information about the kde-core-devel mailing list