Bug 1496198 - Simplify --enable-rust-debug handling r=froydnj

making its value propagate properly to js/src subconfigure.

Differential Revision: https://phabricator.services.mozilla.com/D7688

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2018-10-04 13:39:24 +00:00
parent b4a498b215
commit 7264558d5d

View File

@ -114,14 +114,12 @@ add_old_configure_assignment('MOZ_DEBUG',
depends('--enable-debug')(lambda x: bool(x)))
js_option('--enable-rust-debug',
default=depends(when='--enable-debug')(lambda: True),
help='Build Rust code with debug assertions turned on.')
@depends('--enable-rust-debug', '--enable-debug')
def debug_rust(value, debug):
if value.origin == 'default':
return bool(debug) or None
elif bool(value):
return True
@depends(when='--enable-rust-debug')
def debug_rust():
return True
set_config('MOZ_DEBUG_RUST', debug_rust)
set_define('MOZ_DEBUG_RUST', debug_rust)