Bug 1457482 Add an LTO Build Target r=glandium
authorTom Ritter <tom@mozilla.com>
Wed, 30 May 2018 12:27:25 -0500
changeset 475719 8b89c933a7036cc8aa846b655dc55e619e15face
parent 475718 36132fa62b44b4de90bf90ca9eba9412103bec9b
child 475720 bb7dec4331c1021f37d1e4d2b81571c8391ca0f9
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1457482
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1457482 Add an LTO Build Target r=glandium This build target doesn't have LTO enabled on it (yet) MozReview-Commit-ID: 56tAHMyvH7o
browser/config/mozconfigs/linux64/debug-lto
browser/config/mozconfigs/linux64/nightly-lto
build/unix/mozconfig.lto
taskcluster/ci/build/linux.yml
testing/mozharness/configs/builds/releng_sub_linux_configs/64_lto_tc.py
testing/mozharness/configs/builds/releng_sub_linux_configs/64_lto_tc_and_debug.py
testing/mozharness/mozharness/mozilla/building/buildbase.py
new file mode 100644
--- /dev/null
+++ b/browser/config/mozconfigs/linux64/debug-lto
@@ -0,0 +1,17 @@
+ac_add_options --enable-debug
+ac_add_options --enable-optimize="-O1"
+
+. $topsrcdir/build/mozconfig.stylo
+
+. $topsrcdir/build/unix/mozconfig.lto
+
+# Enable Telemetry
+export MOZ_TELEMETRY_REPORTING=1
+
+# Package js shell.
+export MOZ_PACKAGE_JSSHELL=1
+
+# Need this to prevent name conflicts with the normal nightly build packages
+export MOZ_PKG_SPECIAL=lto
+
+. "$topsrcdir/build/mozconfig.common.override"
new file mode 100644
--- /dev/null
+++ b/browser/config/mozconfigs/linux64/nightly-lto
@@ -0,0 +1,14 @@
+ac_add_options --disable-debug
+ac_add_options --enable-optimize="-O2"
+
+. $topsrcdir/build/mozconfig.stylo
+
+. $topsrcdir/build/unix/mozconfig.lto
+
+# Package js shell.
+export MOZ_PACKAGE_JSSHELL=1
+
+# Need this to prevent name conflicts with the normal nightly build packages
+export MOZ_PKG_SPECIAL=lto
+
+. "$topsrcdir/build/mozconfig.common.override"
new file mode 100644
--- /dev/null
+++ b/build/unix/mozconfig.lto
@@ -0,0 +1,19 @@
+MOZ_AUTOMATION_L10N_CHECK=0
+
+. "$topsrcdir/build/mozconfig.common"
+
+# Use Clang as specified in manifest
+export CC="$topsrcdir/clang/bin/clang"
+export CXX="$topsrcdir/clang/bin/clang++"
+export LLVM_SYMBOLIZER="$topsrcdir/clang/bin/llvm-symbolizer"
+
+# Use a newer binutils, from the tooltool gcc package, if it's there
+if [ -e "$topsrcdir/gcc/bin/ld" ]; then
+    export CC="$CC -B $topsrcdir/gcc/bin"
+    export CXX="$CXX -B $topsrcdir/gcc/bin"
+fi
+
+# Until Bug 1423822 is resolved
+ac_add_options --disable-elf-hack
+
+. "$topsrcdir/build/unix/mozconfig.stdcxx"
--- a/taskcluster/ci/build/linux.yml
+++ b/taskcluster/ci/build/linux.yml
@@ -637,16 +637,78 @@ linux64-asan/debug:
         tooltool-downloads: public
         need-xvfb: true
     toolchains:
         - linux64-clang-6-pre
         - linux64-gcc
         - linux64-rust
         - linux64-sccache
 
+linux64-lto/opt:
+    description: "Linux64 Opt LTO"
+    index:
+        product: firefox
+        job-name: linux64-lto-opt
+    treeherder:
+        platform: linux64/lto
+        symbol: Bo
+        tier: 2
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        env:
+            PERFHERDER_EXTRA_OPTIONS: "opt lto"
+        max-run-time: 36000
+    run:
+        using: mozharness
+        actions: [get-secrets build check-test update]
+        config:
+            - builds/releng_base_firefox.py
+            - builds/releng_base_linux_64_builds.py
+        script: "mozharness/scripts/fx_desktop_build.py"
+        secrets: true
+        custom-build-variant-cfg: lto-tc
+        tooltool-downloads: public
+        need-xvfb: true
+    toolchains:
+        - linux64-clang-6-pre
+        - linux64-gcc
+        - linux64-rust
+        - linux64-sccache
+
+linux64-lto/debug:
+    description: "Linux64 Debug LTO"
+    index:
+        product: firefox
+        job-name: linux64-lto-debug
+    treeherder:
+        platform: linux64/lto
+        symbol: Bd
+        tier: 2
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        env:
+            PERFHERDER_EXTRA_OPTIONS: "debug lto"
+        max-run-time: 36000
+    run:
+        using: mozharness
+        actions: [get-secrets build check-test update]
+        config:
+            - builds/releng_base_firefox.py
+            - builds/releng_base_linux_64_builds.py
+        script: "mozharness/scripts/fx_desktop_build.py"
+        secrets: true
+        custom-build-variant-cfg: lto-tc-and-debug
+        tooltool-downloads: public
+        need-xvfb: true
+    toolchains:
+        - linux64-clang-6-pre
+        - linux64-gcc
+        - linux64-rust
+        - linux64-sccache
+
 linux64-nightly/opt:
     description: "Linux64 Nightly"
     attributes:
         nightly: true
     shipping-phase: build
     shipping-product: firefox
     index:
         product: firefox
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_sub_linux_configs/64_lto_tc.py
@@ -0,0 +1,10 @@
+config = {
+    'default_actions': [
+        'clobber',
+        'build',
+        'check-test',
+        # 'update',
+    ],
+    'stage_platform': 'linux64-lto',
+    'mozconfig_variant': 'nightly-lto',
+}
new file mode 100644
--- /dev/null
+++ b/testing/mozharness/configs/builds/releng_sub_linux_configs/64_lto_tc_and_debug.py
@@ -0,0 +1,11 @@
+config = {
+    'default_actions': [
+        'clobber',
+        'build',
+        'check-test',
+        # 'update',
+    ],
+    'stage_platform': 'linux64-lto-debug',
+    'debug_build': True,
+    'mozconfig_variant': 'debug-lto',
+}
--- a/testing/mozharness/mozharness/mozilla/building/buildbase.py
+++ b/testing/mozharness/mozharness/mozilla/building/buildbase.py
@@ -411,16 +411,18 @@ class BuildOptionParser(object):
         'cross-debug-artifact': 'builds/releng_sub_%s_configs/%s_cross_debug_artifact.py',
         'cross-noopt-debug': 'builds/releng_sub_%s_configs/%s_cross_noopt_debug.py',
         'cross-fuzzing-asan': 'builds/releng_sub_%s_configs/%s_cross_fuzzing_asan.py',
         'cross-artifact': 'builds/releng_sub_%s_configs/%s_cross_artifact.py',
         'debug': 'builds/releng_sub_%s_configs/%s_debug.py',
         'fuzzing-debug': 'builds/releng_sub_%s_configs/%s_fuzzing_debug.py',
         'asan-and-debug': 'builds/releng_sub_%s_configs/%s_asan_and_debug.py',
         'asan-tc-and-debug': 'builds/releng_sub_%s_configs/%s_asan_tc_and_debug.py',
+        'lto-tc': 'builds/releng_sub_%s_configs/%s_lto_tc.py',
+        'lto-tc-and-debug': 'builds/releng_sub_%s_configs/%s_lto_tc_and_debug.py',
         'stat-and-debug': 'builds/releng_sub_%s_configs/%s_stat_and_debug.py',
         'code-coverage-debug': 'builds/releng_sub_%s_configs/%s_code_coverage_debug.py',
         'code-coverage-opt': 'builds/releng_sub_%s_configs/%s_code_coverage_opt.py',
         'source': 'builds/releng_sub_%s_configs/%s_source.py',
         'noopt-debug': 'builds/releng_sub_%s_configs/%s_noopt_debug.py',
         'api-16-gradle-dependencies': 'builds/releng_sub_%s_configs/%s_api_16_gradle_dependencies.py',
         'api-16': 'builds/releng_sub_%s_configs/%s_api_16.py',
         'api-16-artifact': 'builds/releng_sub_%s_configs/%s_api_16_artifact.py',