From b798bb1980d3e1d628171edee909d77b94726278 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Fri, 20 May 2022 08:31:46 +0000 Subject: [PATCH] Bug 1770251 - Centralize PGO mozconfig bits. r=firefox-build-system-reviewers,andi Differential Revision: https://phabricator.services.mozilla.com/D146852 --- build/macosx/mozconfig.common | 10 ---------- build/mozconfig.common | 7 +++++++ build/mozconfig.win-common | 9 --------- build/unix/mozconfig.unix | 9 --------- mobile/android/config/mozconfigs/common | 9 --------- 5 files changed, 7 insertions(+), 37 deletions(-) diff --git a/build/macosx/mozconfig.common b/build/macosx/mozconfig.common index 949db6928b72..d17562c3fae5 100644 --- a/build/macosx/mozconfig.common +++ b/build/macosx/mozconfig.common @@ -1,13 +1,3 @@ if test `uname -s` = Linux; then . $topsrcdir/build/macosx/cross-mozconfig.common fi - -if [ -z "$USE_ARTIFACT" ]; then - if [ -n "$TASKCLUSTER_PGO_PROFILE_USE" ]; then - export MOZ_LTO=cross - ac_add_options --enable-profile-use=cross - ac_add_options --with-pgo-jarlog=${MOZ_FETCHES_DIR}/en-US.log - ac_add_options --with-pgo-profile-path=${MOZ_FETCHES_DIR}/merged.profdata - fi -fi - diff --git a/build/mozconfig.common b/build/mozconfig.common index 3cd68793d7a1..e40875b9e0af 100644 --- a/build/mozconfig.common +++ b/build/mozconfig.common @@ -23,3 +23,10 @@ ac_add_options --enable-js-shell . "$topsrcdir/build/mozconfig.automation" . "$topsrcdir/build/mozconfig.rust" . "$topsrcdir/build/mozconfig.cache" + +if [ -n "$TASKCLUSTER_PGO_PROFILE_USE" -a -z "$USE_ARTIFACT" ]; then + export MOZ_LTO=cross + ac_add_options --enable-profile-use=cross + ac_add_options --with-pgo-jarlog="${MOZ_FETCHES_DIR}/en-US.log" + ac_add_options --with-pgo-profile-path="${MOZ_FETCHES_DIR}/merged.profdata" +fi diff --git a/build/mozconfig.win-common b/build/mozconfig.win-common index 9c592d1f37eb..6fbe8159b2db 100644 --- a/build/mozconfig.win-common +++ b/build/mozconfig.win-common @@ -1,12 +1,3 @@ # 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/. - -if [ -z "$USE_ARTIFACT" ]; then - if [ -n "$TASKCLUSTER_PGO_PROFILE_USE" ]; then - export MOZ_LTO=cross - ac_add_options --enable-profile-use=cross - ac_add_options --with-pgo-jarlog="${MOZ_FETCHES_DIR}/en-US.log" - ac_add_options --with-pgo-profile-path="${MOZ_FETCHES_DIR}/merged.profdata" - fi -fi diff --git a/build/unix/mozconfig.unix b/build/unix/mozconfig.unix index 9ca9c97fce44..9c04803c47b3 100644 --- a/build/unix/mozconfig.unix +++ b/build/unix/mozconfig.unix @@ -23,15 +23,6 @@ else ;; esac - if [ -z "$USE_ARTIFACT" ]; then - if [ -n "$TASKCLUSTER_PGO_PROFILE_USE" ]; then - export MOZ_LTO=cross - ac_add_options --enable-profile-use=cross - ac_add_options --with-pgo-jarlog=${MOZ_FETCHES_DIR}/en-US.log - ac_add_options --with-pgo-profile-path=${MOZ_FETCHES_DIR}/merged.profdata - fi - fi - mk_add_options "export PATH=$MOZ_FETCHES_DIR/binutils/bin:$PATH" fi diff --git a/mobile/android/config/mozconfigs/common b/mobile/android/config/mozconfigs/common index e3533c9f4787..96906405841c 100644 --- a/mobile/android/config/mozconfigs/common +++ b/mobile/android/config/mozconfigs/common @@ -26,15 +26,6 @@ ac_add_options --with-google-safebrowsing-api-keyfile=/builds/sb-gapi.data ac_add_options --with-google-location-service-api-keyfile=/builds/gls-gapi.data ac_add_options --with-mozilla-api-keyfile=/builds/mozilla-fennec-geoloc-api.key -if [ -n "$TASKCLUSTER_PGO_PROFILE_USE" -a -z "$USE_ARTIFACT" ]; then - export MOZ_LTO=cross - - ac_add_options --enable-profile-use=cross - - ac_add_options --with-pgo-jarlog=${MOZ_FETCHES_DIR}/en-US.log - ac_add_options --with-pgo-profile-path=${MOZ_FETCHES_DIR}/merged.profdata -fi - # Package js shell. export MOZ_PACKAGE_JSSHELL=1