Re: [Boost-bugs] [Boost C++ Libraries] #7559: gcc-compatible symbol visibility not supported for clang

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7559: gcc-compatible symbol visibility not supported for clang
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-25 15:42:15


#7559: gcc-compatible symbol visibility not supported for clang
-----------------------------------------------------+----------------------
  Reporter: James Walker <jamesw@…> | Owner: johnmaddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: config
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
-----------------------------------------------------+----------------------

Comment (by michel):

 I was planned to add the following
 {{{
 //
 // Dynamic shared object (DSO) and dynamic-link library (DLL) support
 //
 #if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) &&
 !defined(__CYGWIN__)
      // All Win32 development environments, including 64-bit Windows and
 MinGW, define
      // _WIN32 or one of its variant spellings. Note that Cygwin is a
 POSIX environment,
      // so does not define _WIN32 or its variants.
 # define BOOST_HAS_DECLSPEC
 #else
 # define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
 # define BOOST_SYMBOL_IMPORT
 #endif
 #define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
 }}}

 But I'd like to defer the support for the Windows platform,
 since there are some subtleties on that platform.
 I'm going to add `BOOST_SYMBOL_EXPORT` and `BOOST_SYMBOL_IMPORT` macros
 only on other platforms (i.e. the `#else` branch) for the meantime.

 The `#if` condition in the above code is copied from
 `config/compiler/gcc.hpp`.
 John, do you know why `!defined(__CYGWIN__)` is needed?
 It looks verbose, since `_WIN32` or its variants are not defined on
 cygwin.

 Also, would it be nice to define `BOOST_SYMBOL_IMPORT` only on non-Windows
 platform
 , as mentioned by Mathias?

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7559#comment:8>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC