Bug 1257434 - Move --enable-dmd to moz.configure. r=ted
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -255,16 +255,17 @@ def wanted_mozconfig_variables(help):
'DSYMUTIL',
'EXTERNAL_SOURCE_DIR',
'GENISOIMAGE',
'L10NBASEDIR',
'MOZILLABUILD',
'MOZ_ARTIFACT_BUILDS',
'MOZ_BUILD_APP',
'MOZ_CALLGRIND',
+ 'MOZ_DMD',
'MOZ_FMP4',
'MOZ_INSTRUMENT_EVENT_LOOP',
'MOZ_INSTRUMENTS',
'MOZ_JPROF',
'MOZ_USE_SYSTRACE',
'MOZTTDIR',
'PERL',
'RPMBUILD',
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -186,17 +186,16 @@ def old_configure_options(*options):
'--enable-crashreporter',
'--enable-ctypes',
'--enable-dbm',
'--enable-dbus',
'--enable-debug',
'--enable-debug-js-modules',
'--enable-debug-symbols',
'--enable-directshow',
- '--enable-dmd',
'--enable-dtrace',
'--enable-dump-painting',
'--enable-elf-hack',
'--enable-extensions',
'--enable-faststripe',
'--enable-feeds',
'--enable-gamepad',
'--enable-gc-trace',
--- a/old-configure.in
+++ b/old-configure.in
@@ -1250,34 +1250,26 @@ if test "$MOZ_PROFILING" -a -z "$STRIP_F
;;
esac
fi
dnl ========================================================
dnl = Enable DMD
dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(dmd,
-[ --enable-dmd Enable DMD; also enables jemalloc, replace-malloc and profiling],
- MOZ_DMD=1,
- MOZ_DMD= )
-
if test "$MOZ_DMD"; then
- AC_DEFINE(MOZ_DMD)
-
if test "${CPU_ARCH}" = "arm"; then
CFLAGS="$CFLAGS -funwind-tables"
CXXFLAGS="$CXXFLAGS -funwind-tables"
fi
MOZ_MEMORY=1 # DMD enables jemalloc
MOZ_REPLACE_MALLOC=1 # DMD enables replace-malloc
MOZ_PROFILING=1 # DMD enables profiling
fi
-AC_SUBST(MOZ_DMD)
dnl ========================================================
dnl Profiling
dnl ========================================================
if test -n "$MOZ_PROFILING"; then
AC_DEFINE(MOZ_PROFILING)
fi
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -42,16 +42,28 @@ def sps_profiler(target):
@depends(sps_profiler)
def sps_profiler_define(value):
if value:
set_config('MOZ_ENABLE_PROFILER_SPS', '1')
set_define('MOZ_ENABLE_PROFILER_SPS', '1')
+option('--enable-dmd', env='MOZ_DMD',
+ help='Enable Dark Matter Detector (heap profiler). '
+ 'Also enables jemalloc, replace-malloc and profiling')
+
+@depends('--enable-dmd')
+def dmd(value):
+ if value:
+ set_config('MOZ_DMD', '1')
+ set_define('MOZ_DMD', '1')
+ add_old_configure_assignment('MOZ_DMD', '1')
+
+
# Javascript engine
# ==============================================================
include('../js/moz.configure')
# L10N
# ==============================================================
option('--with-l10n-base', nargs=1, env='L10NBASEDIR',