Bug 1257434 - Move --enable-systrace to moz.configure. r=ted
--- 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')