Bug 1746292 - Move --enable-crashreporter to python configure. r=firefox-build-system-reviewers,mhentges

We don't need to care about cross-compiled breakpad tools because
dump-syms (which is what this was about) is now written in rust (and
it's bootstrapped).

Differential Revision: https://phabricator.services.mozilla.com/D133965
This commit is contained in:
Mike Hommey 2021-12-16 07:48:36 +00:00
Родитель 69ea299bd8
Коммит 8846d35b52
3 изменённых файлов: 43 добавлений и 58 удалений

Просмотреть файл

@ -91,7 +91,6 @@ def old_configure_options(*options):
@old_configure_options( @old_configure_options(
"--cache-file", "--cache-file",
"--datadir", "--datadir",
"--enable-crashreporter",
"--enable-dbus", "--enable-dbus",
"--enable-debug-js-modules", "--enable-debug-js-modules",
"--enable-dump-painting", "--enable-dump-painting",

Просмотреть файл

@ -1488,61 +1488,6 @@ fi
fi # COMPILE_ENVIRONMENT fi # COMPILE_ENVIRONMENT
dnl ========================================================
dnl = Breakpad crash reporting (on by default on supported platforms)
dnl ========================================================
case $target in
i?86-*-mingw*|x86_64-*-mingw*|aarch64-*-mingw*)
MOZ_CRASHREPORTER=1
;;
i?86-apple-darwin*|x86_64-apple-darwin*|aarch64-apple-darwin*)
MOZ_CRASHREPORTER=1
;;
*-android*|*-linuxandroid*)
dnl Android/arm is arm-unknown-linux-androideabi, so android condition should
dnl be before Linux condition
dnl The crash reporter prevents crash stacktraces to be logged in the
dnl logs so we leave it out by default in developer builds.
if test -z "$DEVELOPER_OPTIONS"; then
MOZ_CRASHREPORTER=1
fi
;;
i?86-*-linux*|x86_64-*-linux*|arm-*-linux*)
if test "$MOZ_ENABLE_GTK"; then
MOZ_CRASHREPORTER=1
fi
;;
esac
MOZ_ARG_DISABLE_BOOL(crashreporter,
[ --disable-crashreporter Disable breakpad crash reporting],
[MOZ_CRASHREPORTER=],
[MOZ_CRASHREPORTER=F # Force enable breakpad])
if test "$OS_ARCH" != "$HOST_OS_ARCH" -a "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "Darwin" -a "$MOZ_WIDGET_TOOLKIT" != "android"; then
if test "$MOZ_CRASHREPORTER" = F; then
AC_MSG_ERROR([Cannot --enable-crashreporter, as breakpad tools do not support compiling on $HOST_OS_ARCH while targeting $OS_ARCH.])
fi
MOZ_CRASHREPORTER=
fi
if test -n "$MOZ_CRASHREPORTER"; then
AC_DEFINE(MOZ_CRASHREPORTER)
if test "$OS_TARGET" = "Linux" && \
test -z "$SKIP_LIBRARY_CHECKS"; then
PKG_CHECK_MODULES(MOZ_GTHREAD, gthread-2.0)
fi
if test "$OS_ARCH" = "WINNT"; then
if test -z "$HAVE_64BIT_BUILD" -a -n "$COMPILE_ENVIRONMENT"; then
MOZ_CRASHREPORTER_INJECTOR=1
AC_DEFINE(MOZ_CRASHREPORTER_INJECTOR)
fi
fi
fi
dnl ======================================================== dnl ========================================================
dnl = Enable compilation of specific extension modules dnl = Enable compilation of specific extension modules
dnl ======================================================== dnl ========================================================
@ -2086,8 +2031,6 @@ AC_SUBST_LIST(WARNINGS_CFLAGS)
AC_SUBST_SET(MOZ_EXTENSIONS) AC_SUBST_SET(MOZ_EXTENSIONS)
AC_SUBST(MOZ_UNIVERSALCHARDET) AC_SUBST(MOZ_UNIVERSALCHARDET)
AC_SUBST(MOZ_CRASHREPORTER)
AC_SUBST(MOZ_CRASHREPORTER_INJECTOR)
AC_SUBST(MOZ_STUB_INSTALLER) AC_SUBST(MOZ_STUB_INSTALLER)
AC_SUBST(MOZ_UPDATER) AC_SUBST(MOZ_UPDATER)

Просмотреть файл

@ -2624,3 +2624,46 @@ with only_when(compile_environment):
pkg_check_modules("MOZ_LIBEVENT", "libevent", when="--with-system-libevent") pkg_check_modules("MOZ_LIBEVENT", "libevent", when="--with-system-libevent")
set_config("MOZ_SYSTEM_LIBEVENT", True, when="--with-system-libevent") set_config("MOZ_SYSTEM_LIBEVENT", True, when="--with-system-libevent")
# Crash reporting
# ==============================================================
@depends(target, developer_options)
def crashreporter_default(target, developer_options):
if target.kernel in ("WINNT", "Darwin"):
return True
if target.kernel == "Linux" and target.cpu in ("x86", "x86_64", "arm", "aarch64"):
# The crash reporter prevents crash stacktraces to be logged in the
# logs on Android, so we leave it out by default in developer builds.
return target.os != "Android" or not developer_options
option(
"--enable-crashreporter",
default=crashreporter_default,
help="{Enable|Disable} crash reporting",
)
set_config("MOZ_CRASHREPORTER", True, when="--enable-crashreporter")
set_define("MOZ_CRASHREPORTER", True, when="--enable-crashreporter")
add_old_configure_assignment("MOZ_CRASHREPORTER", True, when="--enable-crashreporter")
with only_when(compile_environment):
with only_when("--enable-crashreporter"):
pkg_check_modules(
"MOZ_GTHREAD",
"gthread-2.0",
when=depends(target)(lambda t: t.os == "GNU" and t.kernel == "Linux"),
)
set_config(
"MOZ_CRASHREPORTER_INJECTOR",
True,
when=depends(target)(lambda t: t.os == "WINNT" and t.bitness == 32),
)
set_define(
"MOZ_CRASHREPORTER_INJECTOR",
True,
when=depends(target)(lambda t: t.os == "WINNT" and t.bitness == 32),
)