Bug 1282135 - Require --enable-debug to produce a debug builds, and fix interaction with MOZ_DEBUG in the environment. r=glandium
authorChris Manchester <cmanchester@mozilla.com>
Fri, 24 Jun 2016 12:36:16 -0700
changeset 345293 1e4b0050e62a6bc10f12f899114ee66a6b3bec12
parent 345292 dad76327ba83eb2b1554e81bb78cc5a923ac73fb
child 345294 d51379e5475d29c015fa93e5698439f80ee31938
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1282135
milestone50.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 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)