|
Boost : |
From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2007-12-19 15:13:40
dherring_at_[hidden] wrote:
> libQtGui.so.4.3.1 contains a special ELF section, .gnu_debuglink, that
> points the debugger to libQtGui.so.4.3.1.debug. This way they can install
> a "multithreaded release variant", but it points gdb to a file with all
> the Dwarf information needed for a "debug variant". Deleting that .debug
> file won't hurt people who don't use the debugger.
>
> I haven't taken the time to figure out how they build this, but it looks
> like a worthwhile trick.
This works as long as both variants contain the same code. However, if
the release variant is built with -DNDEBUG and the debug variant is not
(say, to activate assert() only in debug mode), you really do need two
separate builds.
(On the topic of optimizing multi-variant builds: at least on Linux it
is possible to use the same object files for DSOs as well as archives,
so in principle it wouldn't be necessary to recompile everything twice
in order to get shared and static build variants.)
Regards,
Stefan
-- ...ich hab' noch einen Koffer in Berlin...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk