aboutsummaryrefslogtreecommitdiff
path: root/projects/sample/autoconf/m4/visibility_inlines_hidden.m4
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-04-14 13:54:10 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-04-14 13:54:10 +0000
commit63faed5b8e4f2755f127fcb8aa440480c0649327 (patch)
tree19c69a04768629f2d440944b71cbe90adae0b615 /projects/sample/autoconf/m4/visibility_inlines_hidden.m4
parentd4c8b5d2e851b0e8a063c6bf8543a4823a26c15a (diff)
downloadsrc-63faed5b8e4f2755f127fcb8aa440480c0649327.tar.gz
src-63faed5b8e4f2755f127fcb8aa440480c0649327.zip
Vendor import of llvm trunk r154661:vendor/llvm/llvm-trunk-r154661
Notes
Notes: svn path=/vendor/llvm/dist/; revision=234285 svn path=/vendor/llvm/llvm-trunk-r154661/; revision=234286; tag=vendor/llvm/llvm-trunk-r154661
Diffstat (limited to 'projects/sample/autoconf/m4/visibility_inlines_hidden.m4')
-rw-r--r--projects/sample/autoconf/m4/visibility_inlines_hidden.m422
1 files changed, 22 insertions, 0 deletions
diff --git a/projects/sample/autoconf/m4/visibility_inlines_hidden.m4 b/projects/sample/autoconf/m4/visibility_inlines_hidden.m4
new file mode 100644
index 000000000000..42ddbe9128b3
--- /dev/null
+++ b/projects/sample/autoconf/m4/visibility_inlines_hidden.m4
@@ -0,0 +1,22 @@
+#
+# Determine if the compiler accepts -fvisibility-inlines-hidden
+#
+# This macro is specific to LLVM.
+#
+AC_DEFUN([AC_CXX_USE_VISIBILITY_INLINES_HIDDEN],
+[AC_CACHE_CHECK([for compiler -fvisibility-inlines-hidden option],
+ [llvm_cv_cxx_visibility_inlines_hidden],
+[ AC_LANG_PUSH([C++])
+ oldcxxflags="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ [llvm_cv_cxx_visibility_inlines_hidden=yes],[llvm_cv_cxx_visibility_inlines_hidden=no])
+ CXXFLAGS="$oldcxxflags"
+ AC_LANG_POP([C++])
+])
+if test "$llvm_cv_cxx_visibility_inlines_hidden" = yes ; then
+ AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[1])
+else
+ AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[0])
+fi
+])