зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1834815 - Enable full+cross LTO by default for shippable Linux and Windows build r=glandium
This has an important impact on compilation time, so we limit that to shippable builds and under MOZ_AUTOMATION. The benefit on speedometer time is not significant on macosx and android builds, so we skip that platform. Builds tend to stall on arm platforms, so we limit the target to x86_64. Differential Revision: https://phabricator.services.mozilla.com/D179912
This commit is contained in:
Родитель
8a57a15db0
Коммит
b02dbe2bb1
|
@ -187,6 +187,8 @@ imply_option("MOZ_LD64_KNOWN_GOOD", depends_if("MOZ_AUTOMATION")(lambda _: True)
|
|||
target,
|
||||
"--enable-profile-generate",
|
||||
pass_manager.enabled,
|
||||
"--enable-profile-use",
|
||||
"MOZ_AUTOMATION",
|
||||
)
|
||||
@imports("multiprocessing")
|
||||
def lto(
|
||||
|
@ -197,6 +199,8 @@ def lto(
|
|||
target,
|
||||
instrumented_build,
|
||||
pass_manager,
|
||||
pgo_build,
|
||||
moz_automation,
|
||||
):
|
||||
cflags = []
|
||||
ldflags = []
|
||||
|
@ -210,12 +214,23 @@ def lto(
|
|||
if "full" in values and "thin" in values:
|
||||
die("incompatible --enable-lto choices 'full' and 'thin'")
|
||||
|
||||
# If a value was given to --enable-lto, use that.
|
||||
# Otherwise, make the lto mode explicit, using
|
||||
# thin with clang/clang-cl and full with gcc.
|
||||
# If a value was given to --enable-lto, use that. Otherwise, make the lto
|
||||
# mode explicit, using full with gcc, and full or thin with clang depending
|
||||
# on the performance benefit.
|
||||
# Defaulting to full LTO is costly in terms of compilation time, so we only
|
||||
# default to it if MOZ_AUTOMATION and PGO are on, and for some platforms.
|
||||
# Based on speedometer3 scores, full lto + pgo is beneficial for Linux and
|
||||
# Windows for x86_64 targets.
|
||||
if values == () or values == ("cross",):
|
||||
if c_compiler.type == "gcc":
|
||||
values += ("full",)
|
||||
elif (
|
||||
pgo_build
|
||||
and moz_automation
|
||||
and target.os in ("WINNT", "GNU")
|
||||
and target.cpu == "x86_64"
|
||||
):
|
||||
values += ("full",)
|
||||
else:
|
||||
values += ("thin",)
|
||||
|
||||
|
|
|
@ -435,7 +435,7 @@ linux64-devedition/opt:
|
|||
treeherder:
|
||||
platform: linux64-devedition/opt
|
||||
symbol: B
|
||||
worker-type: b-linux-gcp
|
||||
worker-type: b-linux-xlarge-gcp
|
||||
worker:
|
||||
max-run-time: 7200
|
||||
env:
|
||||
|
@ -453,6 +453,7 @@ linux64-devedition/opt:
|
|||
- taskcluster_nightly.py
|
||||
extra-config:
|
||||
stage_platform: 'linux64-devedition'
|
||||
max_build_output_timeout: 3600
|
||||
script: "mozharness/scripts/fx_desktop_build.py"
|
||||
secrets: true
|
||||
tooltool-downloads: public
|
||||
|
@ -885,7 +886,7 @@ linux64-reproduced/opt:
|
|||
treeherder:
|
||||
platform: linux64-shippable/opt
|
||||
symbol: Bpgo(repr)
|
||||
worker-type: b-linux-gcp
|
||||
worker-type: b-linux-xlarge-gcp
|
||||
worker:
|
||||
max-run-time: 9000
|
||||
env:
|
||||
|
@ -897,6 +898,8 @@ linux64-reproduced/opt:
|
|||
- builds/releng_base_firefox.py
|
||||
- builds/releng_base_linux_64_builds.py
|
||||
- taskcluster_nightly.py
|
||||
extra-config:
|
||||
max_build_output_timeout: 3600
|
||||
script: "mozharness/scripts/fx_desktop_build.py"
|
||||
secrets: true
|
||||
tooltool-downloads: public
|
||||
|
@ -1281,7 +1284,7 @@ linux64-asan-reporter-shippable/opt:
|
|||
platform: linux64-asan-reporter/opt
|
||||
symbol: BoR
|
||||
run-on-projects: ['mozilla-central']
|
||||
worker-type: b-linux-gcp
|
||||
worker-type: b-linux-xlarge-gcp
|
||||
worker:
|
||||
env:
|
||||
PERFHERDER_EXTRA_OPTIONS: asan-reporter
|
||||
|
@ -1294,6 +1297,8 @@ linux64-asan-reporter-shippable/opt:
|
|||
- builds/releng_base_firefox.py
|
||||
- builds/releng_base_linux_64_builds.py
|
||||
- taskcluster_nightly.py
|
||||
extra-config:
|
||||
max_build_output_timeout: 3600
|
||||
script: "mozharness/scripts/fx_desktop_build.py"
|
||||
secrets: true
|
||||
custom-build-variant-cfg: asan-reporter-tc
|
||||
|
@ -1374,7 +1379,7 @@ linux64-shippable/opt:
|
|||
platform: linux64-shippable/opt
|
||||
symbol: Bpgo(B)
|
||||
run-on-projects: ['release']
|
||||
worker-type: b-linux-gcp
|
||||
worker-type: b-linux-xlarge-gcp
|
||||
worker:
|
||||
max-run-time: 9000
|
||||
env:
|
||||
|
@ -1390,6 +1395,8 @@ linux64-shippable/opt:
|
|||
- builds/releng_base_firefox.py
|
||||
- builds/releng_base_linux_64_builds.py
|
||||
- taskcluster_nightly.py
|
||||
extra-config:
|
||||
max_build_output_timeout: 3600
|
||||
script: "mozharness/scripts/fx_desktop_build.py"
|
||||
secrets: true
|
||||
tooltool-downloads: public
|
||||
|
@ -1419,7 +1426,7 @@ linux64-nightlyasrelease/opt:
|
|||
platform: linux64-nightlyasrelease/opt
|
||||
symbol: Bpgo(Bnar)
|
||||
run-on-projects: [trunk-only]
|
||||
worker-type: b-linux-gcp
|
||||
worker-type: b-linux-xlarge-gcp
|
||||
worker:
|
||||
max-run-time: 9000
|
||||
env:
|
||||
|
@ -1436,6 +1443,8 @@ linux64-nightlyasrelease/opt:
|
|||
- builds/releng_base_firefox.py
|
||||
- builds/releng_base_linux_64_builds.py
|
||||
- taskcluster_nightly.py
|
||||
extra-config:
|
||||
max_build_output_timeout: 3600
|
||||
script: "mozharness/scripts/fx_desktop_build.py"
|
||||
mozconfig-variant: nightly-as-release
|
||||
secrets: true
|
||||
|
|
|
@ -517,7 +517,7 @@ win64-shippable/opt:
|
|||
symbol: Bpgo(B)
|
||||
tier: 1
|
||||
run-on-projects: ['release']
|
||||
worker-type: b-linux-gcp
|
||||
worker-type: b-linux-xlarge-gcp
|
||||
worker:
|
||||
max-run-time: 10800
|
||||
env:
|
||||
|
@ -534,6 +534,7 @@ win64-shippable/opt:
|
|||
extra-config:
|
||||
stage_platform: win64
|
||||
mozconfig_platform: win64
|
||||
max_build_output_timeout: 3600
|
||||
fetches:
|
||||
toolchain:
|
||||
- linux64-clang
|
||||
|
@ -563,7 +564,7 @@ win64-nightlyasrelease/opt:
|
|||
treeherder:
|
||||
platform: win64-nightlyasrelease/opt
|
||||
symbol: Bpgo(Bnar)
|
||||
worker-type: b-linux-gcp
|
||||
worker-type: b-linux-xlarge-gcp
|
||||
worker:
|
||||
max-run-time: 10800
|
||||
env:
|
||||
|
@ -581,6 +582,7 @@ win64-nightlyasrelease/opt:
|
|||
extra-config:
|
||||
stage_platform: win64
|
||||
mozconfig_platform: win64
|
||||
max_build_output_timeout: 3600
|
||||
mozconfig-variant: nightly-as-release
|
||||
run-on-projects: [trunk-only]
|
||||
fetches:
|
||||
|
@ -1167,7 +1169,7 @@ win64-asan-reporter-shippable/opt:
|
|||
treeherder:
|
||||
platform: win64-asan-reporter/opt
|
||||
symbol: BoR
|
||||
worker-type: b-linux-gcp
|
||||
worker-type: b-linux-xlarge-gcp
|
||||
worker:
|
||||
max-run-time: 7200
|
||||
env:
|
||||
|
@ -1186,6 +1188,7 @@ win64-asan-reporter-shippable/opt:
|
|||
extra-config:
|
||||
stage_platform: win64-asan-reporter
|
||||
mozconfig_platform: win64
|
||||
max_build_output_timeout: 3600
|
||||
mozconfig-variant: nightly-asan-reporter
|
||||
mar-channel-id:
|
||||
firefox-mozilla-central-asan
|
||||
|
@ -1338,7 +1341,7 @@ win64-devedition/opt:
|
|||
platform: windows2012-64-devedition/opt
|
||||
symbol: B
|
||||
tier: 1
|
||||
worker-type: b-linux-gcp
|
||||
worker-type: b-linux-xlarge-gcp
|
||||
worker:
|
||||
max-run-time: 10800
|
||||
env:
|
||||
|
@ -1355,6 +1358,7 @@ win64-devedition/opt:
|
|||
extra-config:
|
||||
stage_platform: win64-devedition
|
||||
mozconfig_platform: win64
|
||||
max_build_output_timeout: 3600
|
||||
mozconfig-variant: devedition
|
||||
run-on-projects: ['mozilla-beta']
|
||||
fetches:
|
||||
|
|
Загрузка…
Ссылка в новой задаче