Skip to content

Commit de4238f

Browse files
committed
build: consolidate reduced export checks
1 parent 012bdec commit de4238f

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

configure.ac

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,12 +1191,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
11911191
[ AC_MSG_RESULT(no); HAVE_WEAK_GETAUXVAL=0 ]
11921192
)
11931193

1194-
dnl Check for reduced exports
1195-
if test x$use_reduce_exports = xyes; then
1196-
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[RE_CXXFLAGS="-fvisibility=hidden"],
1197-
[AC_MSG_ERROR([Cannot set default symbol visibility. Use --disable-reduce-exports.])])
1198-
fi
1199-
12001194
AC_MSG_CHECKING([for std::system])
12011195
AC_LINK_IFELSE(
12021196
[ AC_LANG_PROGRAM(
@@ -1410,9 +1404,11 @@ BOOST_CPPFLAGS="-DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC $BOOST_CPPFL
14101404
BOOST_LIBS="$BOOST_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_THREAD_LIB"
14111405
fi
14121406

1407+
dnl Check for reduced exports
14131408
if test x$use_reduce_exports = xyes; then
1414-
CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS"
1415-
AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]], [RELDFLAGS="-Wl,--exclude-libs,ALL"],, [[$LDFLAG_WERROR]])
1409+
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden],[CXXFLAGS="$CXXFLAGS -fvisibility=hidden"],
1410+
[AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])],[[$CXXFLAG_WERROR]])
1411+
AX_CHECK_LINK_FLAG([[-Wl,--exclude-libs,ALL]],[RELDFLAGS="-Wl,--exclude-libs,ALL"],,[[$LDFLAG_WERROR]])
14161412
fi
14171413

14181414
if test x$use_tests = xyes; then

0 commit comments

Comments
 (0)