|
From: Ralf M. <rm...@am...> - 2009-09-05 00:36:37
|
Guowen Han wrote: > configure CXXFLAGS = '-O2 -Wall' > or what ever you like. > > BTW, I learnt this from Luigi years ago. > > Thanks, Yes, this worked like a charm, thx. Here's my results: Re: Creating QuantLib libraries without debug symbols: 1.) default make (ie. with debug symbols as this is default) libQuantLib-0.9.9.a about 255 MB libQuantLib-0.9.9.so about 116 MB stripped: -rw-r--r-- 1 root staff 29059270 2009-09-04 05:14 libQuantLib-0.9.9.a -rwxr-xr-x 1 root staff 13404972 2009-09-04 05:14 libQuantLib-0.9.9.so 2.) make without debug symbols (export CXXFLAGS="-O2 -Wall" before ./configure): -rw-r--r-- 1 root staff 52913424 2009-09-05 02:07 libQuantLib-0.9.9.a -rwxr-xr-x 1 root staff 16454629 2009-09-05 02:07 libQuantLib-0.9.9.so stripped: -rw-r--r-- 1 root staff 29059270 2009-09-05 02:11 libQuantLib-0.9.9.a -rwxr-xr-x 1 root staff 13404972 2009-09-05 02:11 libQuantLib-0.9.9.so Conclusion: Even if one disables debug symbol generation, there are still debug symbols in the libraries present (cf. above), probably caused by linked in code from other libraries, boost?) So stripping is neccessary to eliminate them completely (strip libname). > "Ralf M." <rm...@am...> > 09/04/2009 01:38 PM > > To > qua...@li... > cc > > Subject > [Quantlib-dev] Disabling debug symbol generation at compile time > > Hi, > I know one can strip the debug symbols, but I would like to > disable debug symbol generation completely at compile time > to speed up the compilation and link process and to conserve disk space. > Where should this be best done? > > Asked differently: is there a "build for release" switch > or setting in/for ./autogen.sh, ./configure, Makefile etc., > or an environment variable for this? > > Platform: svn snapshot on Linux, g++; ie. using the generated Makefile's > w/o using any graphical IDE like eclipse etc.) |