Bug 1496198 - Simplify --enable-rust-debug handling r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 04 Oct 2018 13:39:24 +0000
changeset 498174 5f50bfa10bd626bc595ca53f78d3d4ba7f1e03ff
parent 498173 4b0eafbca6e86b5e1df7bab083b3d785dfb0f4cb
child 498175 01a517eeb9e6aaa9f5973599976a0dfcebbbbe8f
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1496198
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
moz.configure
--- a/moz.configure
+++ b/moz.configure
@@ -109,24 +109,22 @@ def moz_debug(debug):
 set_config('MOZ_DEBUG', moz_debug)
 set_define('MOZ_DEBUG', moz_debug)
 # Override any value MOZ_DEBUG may have from the environment when passing it
 # down to old-configure.
 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)
 
 include('build/moz.configure/pkg.configure')
 # Make this assignment here rather than in pkg.configure to avoid
 # requiring this file in unit tests.
 add_old_configure_assignment('PKG_CONFIG', pkg_config)