attempt to hide non-exported symbols from dynamic library builds

This commit is contained in:
Arvid Norberg 2012-02-16 08:47:53 +00:00
parent 47bd771fd4
commit b2ede2665b
2 changed files with 8 additions and 1 deletions

View File

@ -543,8 +543,14 @@ lib torrent
# hide non-external symbols
<toolset>darwin:<cflags>-fvisibility=hidden
<toolset>darwin:<cxxflags>-fvisibility-inlines-hidden
<toolset>darwin:<linkflags>-W1,-Bsymbolic
<toolset>gcc:<cflags>-fvisibility=hidden
<toolset>gcc:<cxxflags>-fvisibility-inlines-hidden
<toolset>gcc:<linkflags>-W1,-Bsymbolic
<toolset>llvm:<cflags>-fvisibility=hidden
<toolset>llvm:<cxxflags>-fvisibility-inlines-hidden
<toolset>llvm:<linkflags>-W1,-Bsymbolic
$(usage-requirements)

View File

@ -97,7 +97,8 @@ AS_ECHO "Checking for posix thread support:"
AX_PTHREAD()
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
CFLAGS="$PTHREAD_CFLAGS $CFLAGS -fvisibility=hidden"
CXXFLAGS="$CXXFLAGS -fvisibility=hidden -fvisibility-inlines-hidden"
CC="$PTHREAD_CC"
AS_ECHO