зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1412932 - Set MOZ_PGO for configure; r=ted
The mechanism by which PGO builds are kicked off is kinda wonky. The MOZ_PGO environment variable is recognized by configure and setting it will result in MOZ_PGO being defined in substs. In addition, the build backend (previously client.mk, now Makefile.in) also recognizes MOZ_PGO (from mozconfig or environment) and takes appropriate action. In-tree mozconfigs set MOZ_PGO via mk_add_options. mk_add_options is intended as a mechanism to inject state into client.mk and the make-based build system. In addition, there is code in mozharness (unchanged by this commit) that sets MOZ_PGO if appropriate. A PGO build configuration is different from a non-PGO build configuration. Therefore a make-centric environment variable to control PGO is not ideal. Instead, this should be defined as a configure-time flag and the build invocation should key off that. This commit normalizes in-tree mozconfigs to set MOZ_PGO via ac_add_options and updates the PGO documentation to recommend this method. MozReview-Commit-ID: k6AZyJuXjs --HG-- extra : rebase_source : b1a6348611eba08dd67ec938cca5586fbe8e6910 extra : source : 25c7ebc7c44dd253f421b6de3d0337635d0c99d0
This commit is contained in:
Родитель
7b5dac63f8
Коммит
c2d58c7edd
|
@ -7,7 +7,6 @@ fi
|
|||
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-verify-mar
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
ac_add_options MOZ_PGO=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
|
|
@ -17,7 +17,7 @@ STRIP_FLAGS="--strip-debug"
|
|||
|
||||
ac_add_options --with-branding=browser/branding/aurora
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
ac_add_options MOZ_PGO=1
|
||||
# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
|
||||
ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
|
||||
|
||||
|
|
|
@ -10,8 +10,7 @@ fi
|
|||
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-verify-mar
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
ac_add_options MOZ_PGO=1
|
||||
|
||||
# safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
|
||||
# defines.sh during the beta cycle
|
||||
|
|
|
@ -7,7 +7,6 @@ fi
|
|||
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-verify-mar
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
ac_add_options MOZ_PGO=1
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common.override"
|
||||
|
|
|
@ -17,7 +17,7 @@ STRIP_FLAGS="--strip-debug"
|
|||
|
||||
ac_add_options --with-branding=browser/branding/aurora
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
ac_add_options MOZ_PGO=1
|
||||
# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
|
||||
ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ fi
|
|||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-verify-mar
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
ac_add_options MOZ_PGO=1
|
||||
|
||||
# safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
|
||||
# defines.sh during the beta cycle
|
||||
|
|
|
@ -74,19 +74,19 @@ for platform in all_platforms:
|
|||
'MOZ_AUTOMATION_UPDATE_PACKAGING=1',
|
||||
'fi',
|
||||
]
|
||||
whitelist['release']['win32'] += ['mk_add_options MOZ_PGO=1']
|
||||
whitelist['release']['win64'] += ['mk_add_options MOZ_PGO=1']
|
||||
whitelist['release']['win32'] += ['ac_add_options MOZ_PGO=1']
|
||||
whitelist['release']['win64'] += ['ac_add_options MOZ_PGO=1']
|
||||
|
||||
whitelist['release']['linux32'] += [
|
||||
'export MOZILLA_OFFICIAL=1',
|
||||
'export MOZ_TELEMETRY_REPORTING=1',
|
||||
'mk_add_options MOZ_PGO=1',
|
||||
'ac_add_options MOZ_PGO=1',
|
||||
"mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'",
|
||||
]
|
||||
whitelist['release']['linux64'] += [
|
||||
'export MOZILLA_OFFICIAL=1',
|
||||
'export MOZ_TELEMETRY_REPORTING=1',
|
||||
'mk_add_options MOZ_PGO=1',
|
||||
'ac_add_options MOZ_PGO=1',
|
||||
"mk_add_options PROFILE_GEN_SCRIPT='$(PYTHON) @MOZ_OBJDIR@/_profile/pgo/profileserver.py 10'",
|
||||
]
|
||||
|
||||
|
|
|
@ -6,8 +6,7 @@ fi
|
|||
. "$topsrcdir/build/mozconfig.win-common"
|
||||
. "$topsrcdir/browser/config/mozconfigs/win32/common-opt"
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
|
||||
ac_add_options MOZ_PGO=1
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-verify-mar
|
||||
|
||||
|
|
|
@ -12,8 +12,7 @@ MOZ_REQUIRE_SIGNING=0
|
|||
ac_add_options --enable-verify-mar
|
||||
|
||||
ac_add_options --with-branding=browser/branding/aurora
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
ac_add_options MOZ_PGO=1
|
||||
|
||||
# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
|
||||
ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
|
||||
|
|
|
@ -9,8 +9,7 @@ fi
|
|||
. "$topsrcdir/build/mozconfig.win-common"
|
||||
. "$topsrcdir/browser/config/mozconfigs/win32/common-opt"
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
|
||||
ac_add_options MOZ_PGO=1
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-verify-mar
|
||||
|
||||
|
|
|
@ -7,8 +7,7 @@ fi
|
|||
. "$topsrcdir/browser/config/mozconfigs/win64/common-win64"
|
||||
. "$topsrcdir/browser/config/mozconfigs/win64/common-opt"
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
|
||||
ac_add_options MOZ_PGO=1
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-verify-mar
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@ MOZ_REQUIRE_SIGNING=0
|
|||
ac_add_options --enable-verify-mar
|
||||
|
||||
ac_add_options --with-branding=browser/branding/aurora
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
ac_add_options MOZ_PGO=1
|
||||
|
||||
# Enable MOZ_ALLOW_LEGACY_EXTENSIONS
|
||||
ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1"
|
||||
|
|
|
@ -10,8 +10,7 @@ fi
|
|||
. "$topsrcdir/browser/config/mozconfigs/win64/common-win64"
|
||||
. "$topsrcdir/browser/config/mozconfigs/win64/common-opt"
|
||||
|
||||
mk_add_options MOZ_PGO=1
|
||||
|
||||
ac_add_options MOZ_PGO=1
|
||||
ac_add_options --enable-official-branding
|
||||
ac_add_options --enable-verify-mar
|
||||
|
||||
|
|
|
@ -12,10 +12,14 @@ faster.
|
|||
How PGO Builds Work
|
||||
===================
|
||||
|
||||
The supported interface for invoking a PGO build is to invoke the build system
|
||||
with ``MOZ_PGO`` defined. e.g.::
|
||||
The supported interface for invoking a PGO build is to add ``MOZ_PGO=1`` to
|
||||
configure flags and then build. e.g. in your mozconfig::
|
||||
|
||||
$ MOZ_PGO=1 ./mach build
|
||||
ac_add_options MOZ_PGO=1
|
||||
|
||||
Then::
|
||||
|
||||
$ ./mach build
|
||||
|
||||
This is roughly equivalent to::
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче