Set MOZ_DEBUG globally
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 24 Oct 2017 14:07:37 +0900
changeset 1328708 16baea38ddf1bde69435c8e100d183ed3d5521ea
parent 1328707 7422212754cc911890932b30e33f9351ab51c087
child 1328709 887aa609f2ea7ea533131bd3685e944568523bd9
push id230028
push usermh@glandium.org
push dateTue, 24 Oct 2017 05:11:52 +0000
treeherdertry@66e282e460e2 [default view] [failures only]
milestone58.0a1
Set MOZ_DEBUG globally
js/src/old-configure.in
moz.configure
old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1947,17 +1947,16 @@ AC_SUBST(AS)
 AC_SUBST(ASFLAGS)
 AC_SUBST(AS_DASH_C_FLAG)
 AC_SUBST(RC)
 AC_SUBST(RCFLAGS)
 AC_SUBST(WINDRES)
 AC_SUBST(IMPLIB)
 AC_SUBST(FILTER)
 AC_SUBST(BIN_FLAGS)
-AC_SUBST(MOZ_DEBUG)
 AC_SUBST(MOZ_DEBUG_LDFLAGS)
 AC_SUBST(WARNINGS_AS_ERRORS)
 AC_SUBST(LIBICONV)
 
 AC_SUBST(ENABLE_STRIP)
 AC_SUBST(PKG_SKIP_STRIP)
 AC_SUBST(INCREMENTAL_LINKER)
 
--- a/moz.configure
+++ b/moz.configure
@@ -96,18 +96,24 @@ set_define('GTEST_USE_OWN_TR1_TUPLE',
 set_define('GTEST_HAS_CLONE',
            linux_gtest_defines.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)))
+@depends('--enable-debug')
+def moz_debug(debug):
+    if debug:
+        return bool(debug)
+
+set_config('MOZ_DEBUG')
+set_define('MOZ_DEBUG')
+add_old_configure_assignment('MOZ_DEBUG', moz_debug)
 
 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
--- a/old-configure.in
+++ b/old-configure.in
@@ -4480,17 +4480,16 @@ AC_SUBST(AS_DASH_C_FLAG)
 AC_SUBST(RC)
 AC_SUBST(RCFLAGS)
 AC_SUBST(WINDRES)
 AC_SUBST(IMPLIB)
 AC_SUBST(FILTER)
 AC_SUBST(BIN_FLAGS)
 AC_SUBST(MOZ_AUTH_EXTENSION)
 AC_SUBST(MOZ_PREF_EXTENSIONS)
-AC_SUBST(MOZ_DEBUG)
 AC_SUBST(MOZ_DEBUG_LDFLAGS)
 AC_SUBST(WARNINGS_AS_ERRORS)
 AC_SUBST_SET(MOZ_EXTENSIONS)
 AC_SUBST(LIBICONV)
 AC_SUBST(MOZ_TOOLKIT_SEARCH)
 AC_SUBST(MOZ_FEEDS)
 
 AC_SUBST(MOZ_UNIVERSALCHARDET)