Bug 1460373 - move --enable-valgrind to moz.configure; r=ted.mielczarek

This commit is contained in:
Nathan Froyd 2018-05-09 17:26:31 -04:00
parent 5141d7d645
commit c21c323370
4 changed files with 15 additions and 32 deletions

View File

@ -224,7 +224,6 @@ def old_configure_options(*options):
'--enable-universalchardet',
'--enable-unsigned-overflow-sanitizer',
'--enable-updater',
'--enable-valgrind',
'--enable-verify-mar',
'--enable-xul',
'--enable-zipwriter',

View File

@ -1437,22 +1437,6 @@ fi
AC_SUBST(MOZ_GLUE_IN_PROGRAM)
AC_SUBST_LIST(MOZ_GLUE_WRAP_LDFLAGS)
dnl ========================================================
dnl = Use Valgrind
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(valgrind,
[ --enable-valgrind Enable Valgrind integration hooks (default=no)],
MOZ_VALGRIND=1,
MOZ_VALGRIND= )
if test -n "$MOZ_VALGRIND"; then
MOZ_CHECK_HEADER([valgrind/valgrind.h], [],
AC_MSG_ERROR(
[--enable-valgrind specified but Valgrind is not installed]))
AC_DEFINE(MOZ_VALGRIND)
MOZ_VALGRIND=1
fi
AC_SUBST(MOZ_VALGRIND)
dnl ========================================================
dnl instruments
dnl ========================================================

View File

@ -143,6 +143,21 @@ include('build/moz.configure/flags.configure',
when='--enable-compile-environment')
js_option('--enable-valgrind',
help='Enable Valgrind integration hooks')
valgrind_h = check_header('valgrind/valgrind.h', when='--enable-valgrind')
@depends('--enable-valgrind', valgrind_h)
def check_valgrind(valgrind, valgrind_h):
if valgrind:
if not valgrind_h:
die('--enable-valgrind specified but Valgrind is not installed')
return True
set_define('MOZ_VALGRIND', check_valgrind)
set_config('MOZ_VALGRIND', check_valgrind)
@depends(target, host)
def is_openbsd(target, host):
return target.kernel == 'OpenBSD' or host.kernel == 'OpenBSD'

View File

@ -660,21 +660,6 @@ if test "$GNU_CXX"; then
_USE_CPP_INCLUDE_FLAG=1
fi
dnl ========================================================
dnl = Use Valgrind
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(valgrind,
[ --enable-valgrind Enable Valgrind integration hooks (default=no)],
MOZ_VALGRIND=1,
MOZ_VALGRIND= )
if test -n "$MOZ_VALGRIND"; then
MOZ_CHECK_HEADER([valgrind/valgrind.h], [],
AC_MSG_ERROR(
[--enable-valgrind specified but Valgrind is not installed]))
AC_DEFINE(MOZ_VALGRIND)
fi
AC_SUBST(MOZ_VALGRIND)
# For profiling builds keep the symbol information
if test "$MOZ_PROFILING" -a -z "$STRIP_FLAGS"; then
case "$OS_TARGET" in