Bug 1292463 - Set MOZ_PGO subst/config from python configure. r?chmanchester draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 05 Aug 2016 16:38:39 +0900
changeset 398345 38915e2c6ca97e0340b2d6ce914b40466f6714b3
parent 398344 cb9aae8abb61aa79ef159f412ee785ab19011b9d
child 398346 3c7fe252f2f62a38a9000cf48da34203a3c4ba33
child 398348 87ece4a66c2247bfbb8fa94c03b6e83c0c88babe
push id25498
push userbmo:mh+mozilla@glandium.org
push dateTue, 09 Aug 2016 00:16:15 +0000
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
@@ -4745,17 +4745,16 @@ fi
 fi # COMPILE_ENVIRONMENT
 
 AC_SUBST(MOZ_OPTIMIZE)
 AC_SUBST(MOZ_FRAMEPTR_FLAGS)
 AC_SUBST(MOZ_OPTIMIZE_FLAGS)
 AC_SUBST(MOZ_OPTIMIZE_RUSTFLAGS)
 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