• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Determine if the compiler accepts -fvisibility-inlines-hidden
3#
4# This macro is specific to LLVM.
5#
6AC_DEFUN([AC_CXX_USE_VISIBILITY_INLINES_HIDDEN],
7[AC_CACHE_CHECK([for compiler -fvisibility-inlines-hidden option],
8                [llvm_cv_cxx_visibility_inlines_hidden],
9[ AC_LANG_PUSH([C++])
10  oldcxxflags="$CXXFLAGS"
11  CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
12  AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
13    [llvm_cv_cxx_visibility_inlines_hidden=yes],[llvm_cv_cxx_visibility_inlines_hidden=no])
14  CXXFLAGS="$oldcxxflags"
15  AC_LANG_POP([C++])
16])
17if test "$llvm_cv_cxx_visibility_inlines_hidden" = yes ; then
18  AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[1])
19else
20  AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[0])
21fi
22])
23