|
Boost : |
Subject: Re: [boost] gcc visibility support
From: Alexander Arhipenko (arhipjan_at_[hidden])
Date: 2009-06-09 03:40:30
On Sun, Jun 7, 2009 at 6:17 PM, Vladimir Prus<ghost_at_[hidden]> wrote:
>
> Over in issue 2114 (https://svn.boost.org/trac/boost/ticket/2114), Jürgen has
> provided a patch to add gcc visiblity support to all separately compiled libraries.
> gcc visibility is a mechanism similar to dllexport on Windows, with the same
> benefits.
>
> I have tried to apply it, and rebuild program_options. The the size of release
> shared library went from 272K down to 224K. The number of relocations went
> from 972 to 872. Both changes seem to be good.
>
> It seems to be unlikely to get the authors of every compiled library to
> look at the patch, so it looks like an alternative approach is necessary.
> Does anybody have any objections to this approach? If not, I'll check
> this in somewhere before Jule 15 deadline, and will take care of checking
> regression results afterwards.
>
> - Volodya
Volodya, just for your information, some time ago I've also attached a
boost-build patch
to the 2114 ticket. It provides new composite feature - 'hide-symbols'
with available
values 'on', 'off', 'ms-compat', 'inlines-hidden'.
So, one can simply build any library with hidden visibility using command:
bjam /boost/libname hide-symbols=on.
(It will work for gcc, darwin assuming that patch you are mentioning
is applied).
Comments and corrections on boost-build changes will be appreciated.
Regards
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk