Bug 1292463 - Set MOZ_PGO subst/config from python configure. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 05 Aug 2016 16:38:39 +0900
changeset 308870 7023c2aa407ddb565451349bab3499510023d9a8
parent 308869 305fce838f23b7b3c73a0c6fea3660587c24ddab
child 308871 f3e203c8eaa616b28ee7995c7268f18d74d051ce
push id20279
push usercbook@mozilla.com
push dateWed, 10 Aug 2016 14:04:43 +0000
treeherderfx-team@531100c1d950 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1292463
milestone51.0a1
Bug 1292463 - Set MOZ_PGO subst/config from python configure. r=chmanchester
build/moz.configure/toolchain.configure
old-configure.in
--- a/build/moz.configure/toolchain.configure
+++ b/build/moz.configure/toolchain.configure
@@ -1,14 +1,21 @@
 # -*- Mode: python; 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/.
 
+# PGO
+# ==============================================================
+option(env='MOZ_PGO', help='Build with profile guided optimizations')
+
+set_config('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
+add_old_configure_assignment('MOZ_PGO', depends('MOZ_PGO')(lambda x: bool(x)))
+
 # yasm detection
 # ==============================================================
 yasm = check_prog('YASM', ['yasm'], allow_missing=True)
 
 @depends_if(yasm)
 @checking('yasm version')
 def yasm_version(yasm):
     version = check_cmd_output(
--- a/old-configure.in
+++ b/old-configure.in
@@ -4740,17 +4740,16 @@ if test -n "$MOZ_OPTIMIZE"; then
 fi
 fi # COMPILE_ENVIRONMENT
 
 AC_SUBST(MOZ_OPTIMIZE)
 AC_SUBST(MOZ_FRAMEPTR_FLAGS)
 AC_SUBST(MOZ_OPTIMIZE_FLAGS)
 AC_SUBST(MOZ_OPTIMIZE_LDFLAGS)
 AC_SUBST_LIST(MOZ_ALLOW_HEAP_EXECUTE_FLAGS)
-AC_SUBST(MOZ_PGO)
 AC_SUBST(MOZ_PGO_OPTIMIZE_FLAGS)
 
 dnl ========================================================
 dnl = Enable NS_StackWalk.
 dnl ========================================================
 
 # On Windows, NS_StackWalk will only work correctly if we have frame pointers
 # available. That will only be true for non-optimized builds, debug builds or