From cfe96c80516e3c2eb78eb784bf8480329bd47229 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 22 Dec 2011 22:25:26 +0000 Subject: [PATCH] Make the -fvisibility-inlines-hidden check more thorough in a hopeless attempt to fix mingw cross-compiles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147191 91177308-0d34-0410-b5e6-96231b3b80d8 --- autoconf/m4/visibility_inlines_hidden.m4 | 4 +++- configure | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/autoconf/m4/visibility_inlines_hidden.m4 b/autoconf/m4/visibility_inlines_hidden.m4 index 42ddbe9128b..ee3d61bc82d 100644 --- a/autoconf/m4/visibility_inlines_hidden.m4 +++ b/autoconf/m4/visibility_inlines_hidden.m4 @@ -9,7 +9,9 @@ AC_DEFUN([AC_CXX_USE_VISIBILITY_INLINES_HIDDEN], [ AC_LANG_PUSH([C++]) oldcxxflags="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [template struct X { inline void f() {} };], + [X().f();])], [llvm_cv_cxx_visibility_inlines_hidden=yes],[llvm_cv_cxx_visibility_inlines_hidden=no]) CXXFLAGS="$oldcxxflags" AC_LANG_POP([C++]) diff --git a/configure b/configure index ad20b850ab0..62b2d1cc9be 100755 --- a/configure +++ b/configure @@ -20993,11 +20993,11 @@ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - +template struct X { inline void f() {} }; int main () { - +X().f(); ; return 0; }