Bug 1415686 - Ensure both configure and old-configure agree on what MOZ_DEBUG means. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 09 Nov 2017 07:41:21 +0900
changeset 1346309 706b069128e34e298685070a4cfb6f1e472b2a28
parent 1346308 5c905129301eab91c066c83095b7a1ce335de52e
child 1346310 250063fc6ce206de9c58484163dd6981bb0c7fa1
push id234151
push usermh@glandium.org
push dateThu, 09 Nov 2017 05:24:09 +0000
treeherdertry@a5c878eee076 [default view] [failures only]
reviewerschmanchester
bugs1415686
milestone58.0a1
Bug 1415686 - Ensure both configure and old-configure agree on what MOZ_DEBUG means. r=chmanchester
moz.configure
--- a/moz.configure
+++ b/moz.configure
@@ -103,17 +103,20 @@ js_option('--enable-debug',
 
 @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)
+# 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',
           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