Commit 623e778f authored by Mike Hommey's avatar Mike Hommey
Browse files

Bug 1641786 - Move --with-debug-label to python configure. r=froydnj

Differential Revision: https://phabricator.services.mozilla.com/D77414
parent 31313191
......@@ -37,15 +37,6 @@ fi
AC_SUBST(MOZ_NO_DEBUG_RTL)
MOZ_DEBUG_ENABLE_DEFS="DEBUG"
MOZ_ARG_WITH_STRING(debug-label,
[ --with-debug-label=LABELS
Define DEBUG_<value> for each comma-separated
value given.],
[ for option in `echo $withval | sed 's/,/ /g'`; do
MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS DEBUG_${option}"
done])
if test -n "$MOZ_DEBUG"; then
if test -n "$COMPILE_ENVIRONMENT"; then
AC_MSG_CHECKING([for valid debug flags])
......@@ -61,14 +52,7 @@ if test -n "$MOZ_DEBUG"; then
fi
CFLAGS=$_SAVE_CFLAGS
fi
MOZ_DEBUG_DEFINES="$MOZ_DEBUG_ENABLE_DEFS"
else
MOZ_DEBUG_DEFINES="NDEBUG TRIMMED"
fi
AC_SUBST_LIST(MOZ_DEBUG_DEFINES)
])
dnl A high level macro for selecting compiler options.
......
......@@ -241,7 +241,6 @@ def old_configure_options(*options):
'--with-app-basename',
'--with-app-name',
'--with-branding',
'--with-debug-label',
'--with-distribution-id',
'--with-intl-api',
'--with-jitreport-granularity',
......
......@@ -117,6 +117,17 @@ set_define('MOZ_DEBUG', moz_debug)
add_old_configure_assignment('MOZ_DEBUG',
depends('--enable-debug')(lambda x: bool(x)))
js_option('--with-debug-label', nargs='+',
help='Debug DEBUG_<value> for each comma-separated value given')
@depends(moz_debug, '--with-debug-label')
def debug_defines(debug, labels):
if debug:
return ['DEBUG'] + ['DEBUG_%s' % label for label in labels]
return ['NDEBUG', 'TRIMMED']
set_config('MOZ_DEBUG_DEFINES', debug_defines)
js_option('--enable-rust-debug',
default=depends(when='--enable-debug')(lambda: True),
help='{Build|Do not build} Rust code with debug assertions turned '
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment