Bug 1370209 - Allow setting --disable-rust-debug when --enable-debug is used. r=froydnj
authorAndrew Osmond <aosmond@mozilla.com>
Mon, 10 Jul 2017 10:46:31 -0400
changeset 368088 9f61b0a0397e393efa5158e2fc5894c2485d49dd
parent 368087 0d0c4418614b6983ec6380f68d7fe317a0c205d3
child 368089 b2851f5df207521a02c608e714f6a46c27de39cf
push id32157
push userkwierso@gmail.com
push dateTue, 11 Jul 2017 01:43:14 +0000
treeherdermozilla-central@0e41d07a703f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1370209
milestone56.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 1370209 - Allow setting --disable-rust-debug when --enable-debug is used. r=froydnj
moz.configure
--- a/moz.configure
+++ b/moz.configure
@@ -110,25 +110,24 @@ set_define('GTEST_HAS_CLONE',
 js_option('--enable-debug',
           nargs='?',
           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)))
 
-imply_option('--enable-rust-debug',
-             depends('--enable-debug')(lambda v: bool(v) or None))
-
 js_option('--enable-rust-debug',
           help='Build Rust code with debug assertions turned on.')
 
-@depends('--enable-rust-debug')
-def debug_rust(debug):
-    if debug:
+@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
 
 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.