Boost logo

Boost :

Subject: Re: [boost] [testing] Add a tester with hidden visibility
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-05-07 12:02:40

On Thursday 07 May 2015 07:54:14 Robert Ramey wrote:
> I've recently had experience with just this question while maintaining the
> serialization library.
> The serialization library can be built as a DLL. The windows version builds
> with MSVC only exporting those symbols which are required from outside.
> That is, it builds with the MSVC of visibility=hidden.
> I set visibility=hidden in the jam file and built with gcc. The library
> then failed to link with most of the tests. So I had to update the source
> code to support the attributes for symbol export on those functions which
> need to be exported. It sounds simple, but getting this right in a way that
> supports both gcc and MSVC is tricky and hard to get correct. I got the
> gcc to build and pass all test, but now the MSVC is broken. Unfortunately,
> our testing system truncates the error message so I can't see why the
> current branch in develop fails to build. I'm still waiting from a
> response from the boost build team.
> In the course of addressing this, I figured - how hard can this be and
> decided to see how other libraries do it. Checking the jam files of other
> libraries - there are only a few which actually build as DLLS, I found that
> no one actually builds with visibility=hidden. I would be very surprised if
> any of them actually build correctly with this switch set. To do this, it
> has to be done for each individual library. You can't just add the switch
> and re-build.

I'm not sure I understand your point. Unless we don't plan to ever support
hidden visibility, we at least need to start testing this configuration.

Boost list run by bdawes at, gregod at, cpdaniel at, john at