Boost logo

Boost :

Subject: Re: [boost] Making Boost invisible
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2018-09-25 17:28:53


On 9/25/18 8:08 PM, John Maddock via Boost wrote:
> Folks I have a bug report against Boost.Config that I don't know what
> (if anything) I should do about:
> https://github.com/boostorg/config/issues/243
>
> The issue is this: lets say I build boost as static libraries with
> -fvisibilty=hidden because I want my application or shared library to
> *hide all boost symbols*.  But there are some parts of boost which
> unconditionally make things visible - throw_exception is one particular
> culprit, but there are others, probably anything which uses
> BOOST_SYMBOL_VISIBLE in fact.
>
> Question: should we support this?  If so how?  The only thing I can
> think of is a user-defined macro which when set, disables symbol
> visibility.

I don't think we need to support this sice the user can already hide any
symbols with linker scripts.

http://man7.org/conf/lca2006/shared_libraries/slide18c.html

Also, a thing to note is that I think there are a few places where Boost
relies on some symbols being defined by user, which means they should be
either defined in the same executable or exported from another. For
instance, tss_cleanup_implemented from Boost.Thread works like this.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk