зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1411156
- Set MOZ_DEBUG globally as both a CONFIG and a #define. r=mshal
Bug 1365460 introduced code paths behind MOZ_DEBUG #ifdefs, but MOZ_DEBUG is never defined, while it is available in CONFIG in moz.builds. This is kind of a confusing situation, but the fact that we've been able to avoid those problems for so long would tend to put the blame on mozjemalloc, and fixes should go there. Except that bug 1261161 explains that the only existing alternative (the DEBUG #define), as used in MFBT, is not working for spidermonkey, so it actually makes sense to converge to MOZ_DEBUG rather than DEBUG. So start defining MOZ_DEBUG globally, fixing the mozjemalloc issues of not having the debug code enabled. Bug 1261161 can then take care of changing the DEBUG #ifdefs. --HG-- extra : rebase_source : 37e3d03ac8350c62c8059d4ca01d1ecfdf5f421a
This commit is contained in:
Родитель
ffe63a7d7f
Коммит
bf5c85e4ef
|
@ -1961,7 +1961,6 @@ AC_SUBST(WINDRES)
|
|||
AC_SUBST(IMPLIB)
|
||||
AC_SUBST(FILTER)
|
||||
AC_SUBST(BIN_FLAGS)
|
||||
AC_SUBST(MOZ_DEBUG)
|
||||
AC_SUBST(MOZ_DEBUG_LDFLAGS)
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
AC_SUBST(LIBICONV)
|
||||
|
|
|
@ -101,8 +101,14 @@ js_option('--enable-debug',
|
|||
help='Enable building with developer debug info '
|
||||
'(using the given compiler flags).')
|
||||
|
||||
add_old_configure_assignment('MOZ_DEBUG',
|
||||
depends('--enable-debug')(lambda v: bool(v)))
|
||||
@depends('--enable-debug')
|
||||
def moz_debug(debug):
|
||||
if debug:
|
||||
return bool(debug)
|
||||
|
||||
set_config('MOZ_DEBUG', moz_debug)
|
||||
set_define('MOZ_DEBUG', moz_debug)
|
||||
add_old_configure_assignment('MOZ_DEBUG', moz_debug)
|
||||
|
||||
js_option('--enable-rust-debug',
|
||||
help='Build Rust code with debug assertions turned on.')
|
||||
|
|
|
@ -4493,7 +4493,6 @@ AC_SUBST(FILTER)
|
|||
AC_SUBST(BIN_FLAGS)
|
||||
AC_SUBST(MOZ_AUTH_EXTENSION)
|
||||
AC_SUBST(MOZ_PREF_EXTENSIONS)
|
||||
AC_SUBST(MOZ_DEBUG)
|
||||
AC_SUBST(MOZ_DEBUG_LDFLAGS)
|
||||
AC_SUBST(WARNINGS_AS_ERRORS)
|
||||
AC_SUBST_SET(MOZ_EXTENSIONS)
|
||||
|
|
|
@ -29,7 +29,7 @@ def generate_symbols_file(output, *args):
|
|||
if undefine in pp.context:
|
||||
del pp.context[undefine]
|
||||
# Hack until MOZ_DEBUG_FLAGS are simply part of buildconfig.defines
|
||||
if buildconfig.substs['MOZ_DEBUG']:
|
||||
if buildconfig.substs.get('MOZ_DEBUG'):
|
||||
pp.context['DEBUG'] = '1'
|
||||
# Ensure @DATA@ works as expected (see the Windows section further below)
|
||||
if buildconfig.substs['OS_TARGET'] == 'WINNT':
|
||||
|
|
|
@ -148,7 +148,7 @@ def process_gyp_result(gyp_result, gyp_dir_attrs, path, config, output,
|
|||
spec = targets[target]
|
||||
|
||||
# Derive which gyp configuration to use based on MOZ_DEBUG.
|
||||
c = 'Debug' if config.substs['MOZ_DEBUG'] else 'Release'
|
||||
c = 'Debug' if config.substs.get('MOZ_DEBUG') else 'Release'
|
||||
if c not in spec['configurations']:
|
||||
raise RuntimeError('Missing %s gyp configuration for target %s '
|
||||
'in %s' % (c, target_name, build_file))
|
||||
|
|
Загрузка…
Ссылка в новой задаче