Skip to content

Commit

Permalink
clang v16 (in combination with mingw-w64) has gotten stricter and now…
Browse files Browse the repository at this point in the history
… fails with: hidden visibility cannot be applied to 'dllexport' declaration
  • Loading branch information
arvidn committed Aug 24, 2023
1 parent 42ca885 commit bae432b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/libtorrent/aux_/export.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ POSSIBILITY OF SUCH DAMAGE.
# endif
#endif

// clang on windows complain if you mark a symbol with visibility hidden that's
// already being exported with dllexport. It seems dllexport doesn't support
// omitting some members of an exported class
#if !defined TORRENT_EXPORT_EXTRA \
&& ((defined __GNUC__ && __GNUC__ >= 4) || defined __clang__)
&& ((defined __GNUC__ && __GNUC__ >= 4) || defined __clang__) && !defined _WIN32
# define TORRENT_UNEXPORT __attribute__((visibility("hidden")))
#else
# define TORRENT_UNEXPORT
Expand Down

0 comments on commit bae432b

Please sign in to comment.