aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--autoconf/configure.ac4
-rwxr-xr-xconfigure88
-rw-r--r--include/llvm/Config/config.h.in4
-rw-r--r--lib/Support/PrettyStackTrace.cpp11
4 files changed, 9 insertions, 98 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 9977f3f..be320cf 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -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
diff --git a/configure b/configure
index 5b67891..dc1b5b3 100755
--- 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
-
-
-
diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in
index 74d361f..d12f82a 100644
--- a/include/llvm/Config/config.h.in
+++ b/include/llvm/Config/config.h.in
@@ -178,10 +178,6 @@
/* 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
diff --git a/lib/Support/PrettyStackTrace.cpp b/lib/Support/PrettyStackTrace.cpp
index e01c491..2fecce3 100644
--- a/lib/Support/PrettyStackTrace.cpp
+++ b/lib/Support/PrettyStackTrace.cpp
@@ -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