summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2013-08-30 20:39:21 +0000
committerDaniel Dunbar <daniel@zuster.org>2013-08-30 20:39:21 +0000
commite179b31bfcb6a49de5fe7df7586a2aade9191e08 (patch)
treea1f2dfe5d9ddc0af87697e57dfca0408b665d940 /autoconf
parentc673f9c6fecb0f828845ada7ea5458f66f896283 (diff)
downloadllvm-e179b31bfcb6a49de5fe7df7586a2aade9191e08.tar.gz
llvm-e179b31bfcb6a49de5fe7df7586a2aade9191e08.tar.bz2
llvm-e179b31bfcb6a49de5fe7df7586a2aade9191e08.tar.xz
[conf] Add config variable to disable crash related overrides.
- We do some nasty things w.r.t. installing or overriding signal handlers in order to improve our crash recovery support or interaction with crash reporting software, and those things are not necessarily appropriate when LLVM is being linked into a client application that has its own ideas about how to do things. This gives those clients a way to disable that handling at build time. - Currently, the code this guards is all Apple specific, but other platforms might have the same concerns so I went for a more generic configure name. Someone who is more familiar with library embedding on Windows can handle choosing which of the Windows/Signals.inc behaviors might make sense to go under this flag. - This also fixes the proper autoconf'ing of ENABLE_BACKTRACES. The code expects it to be undefined when disabled, but the autoconf check was just defining it to 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189694 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac43
1 files changed, 30 insertions, 13 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 993e41ced9..f9c365cb1c 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -800,20 +800,37 @@ esac
AC_DEFINE_UNQUOTED([ENABLE_TIMESTAMPS],$ENABLE_TIMESTAMPS,
[Define if timestamp information (e.g., __DATE__) is allowed])
-dnl Enable embedding timestamp information into build.
+dnl Enable support for showing backtraces.
+AC_ARG_ENABLE(backtraces, AS_HELP_STRING(
+ [--enable-backtraces],
+ [Enable embedding backtraces on crash (default is YES)]),
+ [case "$enableval" in
+ yes) llvm_cv_enable_backtraces="yes" ;;
+ no) llvm_cv_enable_backtraces="no" ;;
+ *) AC_MSG_ERROR([Invalid setting for --enable-backtraces. Use "yes" or "no"]) ;;
+ esac],
+ llvm_cv_enable_backtraces="yes")
+if test "$llvm_cv_enable_backtraces" = "yes" ; then
+ AC_DEFINE([ENABLE_BACKTRACES],[1],
+ [Define if you want backtraces on crash])
+fi
-AC_ARG_ENABLE(backtraces,
- AS_HELP_STRING([--enable-backtraces],
- [Enable embedding backtraces on crash (default is YES)]),,
- enableval=default)
-case "$enableval" in
- yes) AC_SUBST(ENABLE_BACKTRACES,[1]) ;;
- no) AC_SUBST(ENABLE_BACKTRACES,[0]) ;;
- default) AC_SUBST(ENABLE_BACKTRACES,[1]) ;;
- *) AC_MSG_ERROR([Invalid setting for --enable-backtraces. Use "yes" or "no"]) ;;
-esac
-AC_DEFINE_UNQUOTED([ENABLE_BACKTRACES],$ENABLE_BACKTRACES,
- [Define if you want backtraces on crash])
+dnl Enable installing platform specific signal handling overrides, for improved
+dnl CrashRecovery support or interaction with crash reporting software. This
+dnl support may be inappropriate for some clients embedding LLVM as a library.
+AC_ARG_ENABLE(crash-overrides, AS_HELP_STRING(
+ [--enable-crash-overrides],
+ [Enable crash handling overrides (default is YES)]),
+ [case "$enableval" in
+ yes) llvm_cv_enable_crash_overrides="yes" ;;
+ no) llvm_cv_enable_crash_overrides="no" ;;
+ *) AC_MSG_ERROR([Invalid setting for --enable-crash-overrides. Use "yes" or "no"]) ;;
+ esac],
+ llvm_cv_enable_crash_overrides="yes")
+if test "$llvm_cv_enable_crash_overrides" = "yes" ; then
+ AC_DEFINE([ENABLE_CRASH_OVERRIDES],[1],
+ [Define to enable crash handling overrides])
+fi
dnl Allow specific targets to be specified for building (or not)
TARGETS_TO_BUILD=""