[eigen] preventing gcc from generating debugging symbols for eigen internals?

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi List,

In preparation for alpha5 I'm playing with various combinations of compiler 
flags which we could recommened to our users. Eigen now works great 
with -O2 -g, giving almost optimal speed while keeping debugging info.

However there's a problem: the executable code generated is very big (in 
simple examples, it goes up from 12k to 90k), because apparently gcc 
generates a ton of debugging info for the internal classes of eigen. 
Replacing -g (equivalent to -g2) by -g1 reduces the code size almost to the 
level of when debugging is disabled, but we don't want to force our users to 
use only -g1.

I would like to allow our users to generate debugging symbols (-g) for their 
app and for the main visible parts of eigen, but not for eigen internals.

Note, that the internal functions in eigen do get inlined, as is seen with 
the 'nm' tool. So whatever excessive debugging info is compiled, seems to 
relate more to internal classes than to internal functions (i suppose that an 
inlined function has no existence wrt debugging info).

Any idea how to disable debugging info in eigen internals?

Cheers,
Benoit

Attachment: signature.asc
Description: This is a digitally signed message part.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/