Boost logo

Boost :

Subject: Re: [boost] [testing] Add a tester with hidden visibility
From: Robert Ramey (ramey_at_[hidden])
Date: 2015-05-07 10:54:14


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.

Robert Ramey

--
View this message in context: http://boost.2283326.n4.nabble.com/testing-Add-a-tester-with-hidden-visibility-tp4675242p4675247.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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