Skip to content

Commit

Permalink
Bug 1641786 - Move --with-debug-label to python configure. r=froydnj
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed May 29, 2020
1 parent 3131319 commit 623e778
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
16 changes: 0 additions & 16 deletions build/autoconf/compiler-opts.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand All @@ -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.
Expand Down
1 change: 0 additions & 1 deletion build/moz.configure/old.configure
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
11 changes: 11 additions & 0 deletions moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
Expand Down

0 comments on commit 623e778

Please sign in to comment.