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 368027 9f61b0a0397e393efa5158e2fc5894c2485d49dd
parent 368026 0d0c4418614b6983ec6380f68d7fe317a0c205d3
child 368028 b2851f5df207521a02c608e714f6a46c27de39cf
push id92385
push useraosmond@gmail.com
push dateMon, 10 Jul 2017 14:46:51 +0000
treeherdermozilla-inbound@9f61b0a0397e [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.