Bug 948621 (part 2) - Abort DMD-enabled Windows builds unless --enable-profiling is specified. r=ehsan.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 15 Dec 2013 13:50:39 -0800
changeset 160547 4afced469f9d348b47fdce694327bf6f2778b9ae
parent 160546 8a254244f3db007aea4b9b89958a0be2a35de789
child 160548 f8fea5ea69a1d504af7f3903e18a949f765e1eba
push id25836
push userphilringnalda@gmail.com
push dateMon, 16 Dec 2013 01:58:54 +0000
treeherdermozilla-central@f8fea5ea69a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs948621
milestone29.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 948621 (part 2) - Abort DMD-enabled Windows builds unless --enable-profiling is specified. r=ehsan.
memory/replace/dmd/DMD.cpp
memory/replace/dmd/moz.build
--- a/memory/replace/dmd/DMD.cpp
+++ b/memory/replace/dmd/DMD.cpp
@@ -10,16 +10,19 @@
 #include <errno.h>
 #include <limits.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 #ifdef XP_WIN
+#if defined(MOZ_OPTIMIZE) && !defined(MOZ_PROFILING)
+#error "Optimized, DMD-enabled builds on Windows must be built with --enable-profiling"
+#endif
 #include <windows.h>
 #include <process.h>
 #else
 #include <unistd.h>
 #endif
 
 #ifdef ANDROID
 #include <android/log.h>
--- a/memory/replace/dmd/moz.build
+++ b/memory/replace/dmd/moz.build
@@ -18,8 +18,11 @@ SOURCES += [
     '../../../nsprpub/lib/libc/src/strcpy.c',
 ]
 
 LIBRARY_NAME = 'dmd'
 
 FORCE_SHARED_LIB = True
 
 DEFINES['MOZ_NO_MOZALLOC'] = True
+
+if CONFIG['MOZ_OPTIMIZE']:
+    DEFINES['MOZ_OPTIMIZE'] = True