Bug 1257434 - Move --enable-systrace to moz.configure. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 17 Mar 2016 15:56:23 +0900
changeset 327146 aa4f6b5add702e71303ff168fb65c475a549fd97
parent 327145 2a0affe3d0c69fe57d8e0a56fb00c98d06b7bbfd
child 327147 b3f02ffe19e11f2b6b7e8b23c0ba66b01bdad004
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [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-systrace to moz.configure. r=ted
build/moz.configure/init.configure
build/moz.configure/old.configure
old-configure.in
toolkit/moz.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -256,16 +256,17 @@ def wanted_mozconfig_variables(help):
          'EXTERNAL_SOURCE_DIR',
          'GENISOIMAGE',
          'L10NBASEDIR',
          'MOZILLABUILD',
          'MOZ_ARTIFACT_BUILDS',
          'MOZ_BUILD_APP',
          'MOZ_FMP4',
          'MOZ_INSTRUMENT_EVENT_LOOP',
+         'MOZ_USE_SYSTRACE',
          'MOZTTDIR',
          'PERL',
          'RPMBUILD',
          'TAR',
          'UNZIP',
          'USE_FC_FREETYPE',
          'WITHOUT_X',
          'XARGS',
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -269,17 +269,16 @@ def old_configure_options(*options):
     '--enable-synth-pico',
     '--enable-synth-speechd',
     '--enable-system-cairo',
     '--enable-system-extension-dirs',
     '--enable-system-ffi',
     '--enable-system-hunspell',
     '--enable-system-pixman',
     '--enable-system-sqlite',
-    '--enable-systrace',
     '--enable-tasktracer',
     '--enable-tests',
     '--enable-thread-sanitizer',
     '--enable-trace-logging',
     '--enable-tree-freetype',
     '--enable-ui-locale',
     '--enable-universalchardet',
     '--enable-update-channel',
--- a/old-configure.in
+++ b/old-configure.in
@@ -1190,27 +1190,16 @@ dnl ====================================
 dnl = Use profiling compile flags
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(profiling,
 [  --enable-profiling      Set compile flags necessary for using sampling profilers (e.g. shark, perf)],
     MOZ_PROFILING=1,
     MOZ_PROFILING= )
 
 dnl ========================================================
-dnl = Turn on systrace for android/b2g.
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(systrace,
-[  --enable-systrace       Set compile flags necessary for using sampling profilers (e.g. shark, perf)],
-    MOZ_USE_SYSTRACE=1,
-    MOZ_USE_SYSTRACE= )
-if test -n "$MOZ_USE_SYSTRACE"; then
-    AC_DEFINE(MOZ_USE_SYSTRACE)
-fi
-
-dnl ========================================================
 dnl = Use Valgrind
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(valgrind,
 [  --enable-valgrind       Enable Valgrind integration hooks (default=no)],
     MOZ_VALGRIND=1,
     MOZ_VALGRIND= )
 if test -n "$MOZ_VALGRIND"; then
     MOZ_CHECK_HEADER([valgrind/valgrind.h], [],
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -1,14 +1,33 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
+# Profiling
+# ==============================================================
+# Some of the options here imply an option from js/moz.configure,
+# so, need to be declared before the include.
+option('--enable-systrace', env='MOZ_USE_SYSTRACE',
+       help='Turn on systrace for the Gecko profiler on android/b2g')
+
+@depends('--enable-systrace', target)
+def systrace(value, target):
+    if value and target.os != 'Android':
+        error('--enable-systrace cannot be used when targetting %s'
+              % target.os)
+    if value:
+        set_define('MOZ_USE_SYSTRACE', '1')
+
+
+# Javascript engine
+# ==============================================================
 include('../js/moz.configure')
 
 
 # L10N
 # ==============================================================
 option('--with-l10n-base', nargs=1, env='L10NBASEDIR',
        help='Path to l10n repositories')