Bug 1257434 - Move --enable-callgrind to moz.configure. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 17 Mar 2016 16:17:36 +0900
changeset 329140 6172dce22b567d61ca242198b991ac07b5aead09
parent 329139 52260b41c30bd804b8d52238d81b1447eae1be95
child 329141 1ab651479800ea254691aaff12b15bd3b3a8f065
push id1146
push userCallek@gmail.com
push dateMon, 25 Jul 2016 16:35:44 +0000
treeherdermozilla-release@a55778f9cd5a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1257434
milestone48.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 1257434 - Move --enable-callgrind to moz.configure. r=ted Remove the unused DEFINES set in js/xpconnect/shell/moz.build, subsequently making the MOZ_CALLGRIND subst unused, so don't add a set_config for it.
build/moz.configure/init.configure
build/moz.configure/old.configure
js/moz.configure
js/src/old-configure.in
js/xpconnect/shell/moz.build
old-configure.in
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -254,16 +254,17 @@ def wanted_mozconfig_variables(help):
          'DOXYGEN',
          'DSYMUTIL',
          'EXTERNAL_SOURCE_DIR',
          'GENISOIMAGE',
          'L10NBASEDIR',
          'MOZILLABUILD',
          'MOZ_ARTIFACT_BUILDS',
          'MOZ_BUILD_APP',
+         'MOZ_CALLGRIND',
          '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
@@ -173,17 +173,16 @@ def old_configure_options(*options):
     '--enable-android-apz',
     '--enable-android-omx',
     '--enable-android-resource-constrained',
     '--enable-approximate-location',
     '--enable-b2g-bt',
     '--enable-b2g-camera',
     '--enable-b2g-ril',
     '--enable-bundled-fonts',
-    '--enable-callgrind',
     '--enable-chrome-format',
     '--enable-clang-plugin',
     '--enable-content-sandbox',
     '--enable-cookies',
     '--enable-cpp-rtti',
     '--enable-crashreporter',
     '--enable-ctypes',
     '--enable-dbm',
--- a/js/moz.configure
+++ b/js/moz.configure
@@ -79,8 +79,17 @@ js_option('--enable-instruments', env='M
 def instruments(value, target):
     if value and target.os != 'OSX':
         error('--enable-instruments cannot be used when targeting %s'
               % target.os)
     if value:
         set_config('MOZ_INSTRUMENTS', '1')
         set_define('MOZ_INSTRUMENTS', '1')
         add_old_configure_assignment('MOZ_INSTRUMENTS', '1')
+
+
+js_option('--enable-callgrind', env='MOZ_CALLGRIND',
+          help='Enable callgrind profiling')
+
+@depends('--enable-callgrind')
+def callgrind(value):
+    if value:
+        set_define('MOZ_CALLGRIND', '1')
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -2349,23 +2349,18 @@ dnl ====================================
 if test -n "$MOZ_INSTRUMENTS"; then
     MOZ_PROFILING=1
     LIBS="$LIBS -framework CoreFoundation"
 fi
 
 dnl ========================================================
 dnl callgrind
 dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(callgrind,
-[  --enable-callgrind      Enable callgrind profiling. Implies --enable-profiling.],
-    MOZ_CALLGRIND=1,
-    MOZ_CALLGRIND= )
 if test -n "$MOZ_CALLGRIND"; then
     MOZ_PROFILING=1
-    AC_DEFINE(MOZ_CALLGRIND)
 fi
 
 dnl ========================================================
 dnl vtune
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(vtune,
 [  --enable-vtune          Enable vtune profiling. Implies --enable-profiling.],
     MOZ_VTUNE=1,
@@ -2772,17 +2767,16 @@ AC_SUBST(MC)
 AC_SUBST(WINDRES)
 AC_SUBST(IMPLIB)
 AC_SUBST(FILTER)
 AC_SUBST(BIN_FLAGS)
 AC_SUBST(MOZ_DEBUG)
 AC_SUBST(MOZ_DEBUG_SYMBOLS)
 AC_SUBST(MOZ_DEBUG_LDFLAGS)
 AC_SUBST(WARNINGS_AS_ERRORS)
-AC_SUBST(MOZ_CALLGRIND)
 AC_SUBST(MOZ_VTUNE)
 AC_SUBST(MOZ_PROFILING)
 AC_SUBST(LIBICONV)
 
 AC_SUBST(ENABLE_TESTS)
 
 AC_SUBST(ENABLE_STRIP)
 AC_SUBST(PKG_SKIP_STRIP)
--- a/js/xpconnect/shell/moz.build
+++ b/js/xpconnect/shell/moz.build
@@ -15,19 +15,16 @@ SOURCES += [
     'xpcshell.cpp',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
     SOURCES += [
         'xpcshellMacUtils.mm',
     ]
 
-if CONFIG['MOZ_CALLGRIND']:
-    DEFINES['MOZ_CALLGRIND'] = True
-
 include('/ipc/chromium/chromium-config.mozbuild')
 
 LOCAL_INCLUDES += [
     '/toolkit/xre',
 ]
 
 if CONFIG['_MSC_VER']:
     # Always enter a Windows program through wmain, whether or not we're
--- a/old-configure.in
+++ b/old-configure.in
@@ -1221,23 +1221,18 @@ dnl instruments
 dnl ========================================================
 if test -n "$MOZ_INSTRUMENTS"; then
     MOZ_PROFILING=1
 fi
 
 dnl ========================================================
 dnl callgrind
 dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(callgrind,
-[  --enable-callgrind      Enable callgrind profiling. Implies --enable-profiling.],
-    MOZ_CALLGRIND=1,
-    MOZ_CALLGRIND= )
 if test -n "$MOZ_CALLGRIND"; then
     MOZ_PROFILING=1
-    AC_DEFINE(MOZ_CALLGRIND)
 fi
 
 dnl ========================================================
 dnl vtune
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(vtune,
 [  --enable-vtune          Enable vtune profiling. Implies --enable-profiling.],
     MOZ_VTUNE=1,
@@ -7386,17 +7381,16 @@ 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_SYMBOLS)
 AC_SUBST(MOZ_DEBUG_LDFLAGS)
 AC_SUBST(WARNINGS_AS_ERRORS)
 AC_SUBST_SET(MOZ_EXTENSIONS)
-AC_SUBST(MOZ_CALLGRIND)
 AC_SUBST(MOZ_VTUNE)
 AC_SUBST(MOZ_PROFILING)
 AC_SUBST(LIBICONV)
 AC_SUBST(MOZ_PLACES)
 AC_SUBST(MOZ_SOCIAL)
 AC_SUBST(MOZ_TOOLKIT_SEARCH)
 AC_SUBST(MOZ_FEEDS)
 AC_SUBST(NS_PRINTING)