Pull in the libCrashReporterClient.a information with a warning comment.
authorEric Christopher <echristo@apple.com>
Mon, 28 Jun 2010 18:25:51 +0000 (18:25 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 28 Jun 2010 18:25:51 +0000 (18:25 +0000)
Remove library check and regenerate configure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107028 91177308-0d34-0410-b5e6-96231b3b80d8

autoconf/configure.ac
configure
include/llvm/Config/config.h.in
lib/Support/PrettyStackTrace.cpp

index 9977f3f53ab846c1a12f2b67534b3aa134c90ab2..be320cf3981ce604b6189f6a2679cd5a4830b0d3 100644 (file)
@@ -1248,10 +1248,6 @@ AC_ARG_WITH(oprofile,
 AC_DEFINE_UNQUOTED([USE_OPROFILE],$USE_OPROFILE,
                    [Define if we have the oprofile JIT-support library])
 
-dnl gCRAnnotations isn't the function we care about, but it's the only
-dnl thing exported.
-AC_CHECK_LIB(CrashReporterClient, gCRAnnotations)
-
 dnl===-----------------------------------------------------------------------===
 dnl===
 dnl=== SECTION 6: Check for header files
index 5b67891dd81d44e95b7a7bada0317dc0e478bab3..dc1b5b3fbe32ad0fa12409c232180fb4ad7d613f 100755 (executable)
--- a/configure
+++ b/configure
@@ -14775,94 +14775,6 @@ _ACEOF
 
 
 
-{ echo "$as_me:$LINENO: checking for gCRAnnotations in -lCrashReporterClient" >&5
-echo $ECHO_N "checking for gCRAnnotations in -lCrashReporterClient... $ECHO_C" >&6; }
-if test "${ac_cv_lib_CrashReporterClient_gCRAnnotations+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lCrashReporterClient  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char gCRAnnotations ();
-int
-main ()
-{
-return gCRAnnotations ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-        { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-        { ac_try='test -s conftest$ac_exeext'
-  { (case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_CrashReporterClient_gCRAnnotations=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_cv_lib_CrashReporterClient_gCRAnnotations=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_CrashReporterClient_gCRAnnotations" >&5
-echo "${ECHO_T}$ac_cv_lib_CrashReporterClient_gCRAnnotations" >&6; }
-if test $ac_cv_lib_CrashReporterClient_gCRAnnotations = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBCRASHREPORTERCLIENT 1
-_ACEOF
-
-  LIBS="-lCrashReporterClient $LIBS"
-
-fi
-
-
-
 
 
 
index 74d361f8daf63605729b37fd534b71323cbc11e9..d12f82a9012cf637a3cb581c8e78a115d3ba9967 100644 (file)
 /* Set to 1 if the isnan function is found in <math.h> */
 #undef HAVE_ISNAN_IN_MATH_H
 
-/* Define to 1 if you have the `CrashReporterClient' library
-   (-lCrashReporterClient). */
-#undef HAVE_LIBCRASHREPORTERCLIENT
-
 /* Define if you have the libdl library or equivalent. */
 #undef HAVE_LIBDL
 
index e01c491fb3ab85ee955c24a8e46641121e00bc7b..2fecce384538338eaeca09fe7f9967a2c8d1bd60 100644 (file)
@@ -54,8 +54,15 @@ static void PrintCurStackTrace(raw_ostream &OS) {
   OS.flush();
 }
 
-// Integrate with crash reporter.
-#if defined (__APPLE__) && !defined (HAVE_CRASHREPORTERCLIENT_H)
+// Integrate with crash reporter libraries.
+#if defined (__APPLE__) && defined (HAVE_CRASHREPORTERCLIENT_H)
+//  If any clients of llvm try to link to libCrashReporterClient.a themselves,
+//  only one crash info struct will be used.
+CRASH_REPORTER_CLIENT_HIDDEN 
+struct crashreporter_annotations_t gCRAnnotations 
+        __attribute__((section("__DATA," CRASHREPORTER_ANNOTATIONS_SECTION))) 
+        = { CRASHREPORTER_ANNOTATIONS_VERSION, 0, 0, 0 };
+#else if defined (__APPLE__)
 static const char *__crashreporter_info__ = 0;
 asm(".desc ___crashreporter_info__, 0x10");
 #endif