Bug 1282135 - Require --enable-debug to produce a debug builds, and fix interaction with MOZ_DEBUG in the environment. r=glandium draft
authorChris Manchester <cmanchester@mozilla.com>
Fri, 24 Jun 2016 12:36:16 -0700
changeset 381209 73ead565b1d924e3b52a17900c43e601b94a532c
parent 381119 939ecc4e9d055c263633cbe276bfb634a68fe4c5
child 523918 8181d6c33757b4e03fdf0896c76f2a64510d747d
push id21430
push usercmanchester@mozilla.com
push dateFri, 24 Jun 2016 19:36:32 +0000
reviewersglandium
bugs1282135
milestone50.0a1
Bug 1282135 - Require --enable-debug to produce a debug builds, and fix interaction with MOZ_DEBUG in the environment. r=glandium As an effect of this patch, MOZ_DEBUG in the environment is not enough to produce a debug build. MozReview-Commit-ID: BUQfJ3y9dFz
moz.configure
--- a/moz.configure
+++ b/moz.configure
@@ -85,25 +85,18 @@ set_define('GTEST_USE_OWN_TR1_TUPLE',
 set_define('GTEST_HAS_CLONE',
            delayed_getattr(linux_gtest_defines, 'has_clone'))
 
 js_option('--enable-debug',
           nargs='?',
           help='Enable building with developer debug info '
                '(using the given compiler flags).')
 
-@depends('--enable-debug')
-def debug_value(value):
-    # If a value was passed ensure this is set as the value for
-    # old-configure, so that --disable-debug works even when MOZ_DEBUG is
-    # set in the environment.
-    if value.origin != 'default':
-        return bool(value)
-
-add_old_configure_assignment('MOZ_DEBUG', debug_value)
+add_old_configure_assignment('MOZ_DEBUG',
+                             depends('--enable-debug')(lambda v: bool(v)))
 
 @depends('--disable-compile-environment', '--help')
 def toolchain_include(compile_env, help):
     if compile_env:
         return 'build/moz.configure/toolchain.configure'
 
 include(toolchain_include)