[llvm-commits] [llvm] r107028 - in /llvm/trunk: autoconf/configure.ac configure include/llvm/Config/config.h.in lib/Support/PrettyStackTrace.cpp

Eric Christopher echristo at apple.com
Mon Jun 28 11:25:51 PDT 2010


Author: echristo
Date: Mon Jun 28 13:25:51 2010
New Revision: 107028

URL: http://llvm.org/viewvc/llvm-project?rev=107028&view=rev
Log:
Pull in the libCrashReporterClient.a information with a warning comment.

Remove library check and regenerate configure.

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

Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=107028&r1=107027&r2=107028&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Mon Jun 28 13:25:51 2010
@@ -1248,10 +1248,6 @@
 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

Modified: llvm/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/configure?rev=107028&r1=107027&r2=107028&view=diff
==============================================================================
--- llvm/trunk/configure (original)
+++ llvm/trunk/configure Mon Jun 28 13:25:51 2010
@@ -14775,94 +14775,6 @@
 
 
 
-{ 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
-
-
-
 
 
 

Modified: llvm/trunk/include/llvm/Config/config.h.in
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Config/config.h.in?rev=107028&r1=107027&r2=107028&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Config/config.h.in (original)
+++ llvm/trunk/include/llvm/Config/config.h.in Mon Jun 28 13:25:51 2010
@@ -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
 

Modified: llvm/trunk/lib/Support/PrettyStackTrace.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/PrettyStackTrace.cpp?rev=107028&r1=107027&r2=107028&view=diff
==============================================================================
--- llvm/trunk/lib/Support/PrettyStackTrace.cpp (original)
+++ llvm/trunk/lib/Support/PrettyStackTrace.cpp Mon Jun 28 13:25:51 2010
@@ -54,8 +54,15 @@
   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





More information about the llvm-commits mailing list