Bug 1481721 - Switch Linux nightlies and PGO builds to clang r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 11 Sep 2018 22:52:29 +0000
changeset 491554 23860890d959f318130e619976cbeae4472937a3
parent 491553 ec76e671d3da837bfabba43660343576fda8f90d
child 491574 703546ab6d0cb643028a1ab4fda997b38f38a2e6
child 491575 1c34d1145c5ed81c599a005f9f28b87944507437
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1481721
milestone64.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 1481721 - Switch Linux nightlies and PGO builds to clang r=froydnj And enable LTO on CI builds using clang + PGO. Differential Revision: https://phabricator.services.mozilla.com/D4991
build/mozconfig.no-compile
build/unix/mozconfig.unix
taskcluster/ci/build/linux.yml
--- a/build/mozconfig.no-compile
+++ b/build/mozconfig.no-compile
@@ -16,14 +16,15 @@ unset RUSTC
 unset CARGO
 unset RUSTDOC
 unset RUSTFMT
 unset CBINDGEN
 unset MAKECAB
 unset TOOLCHAIN_PREFIX
 unset BINDGEN_CFLAGS
 unset LLVM_CONFIG
+unset LLVM_PROFDATA
 unset WIN64_LINK
 unset WIN64_LIB
 unset ENABLE_CLANG_PLUGIN
 
 unset MOZ_STDCXX_COMPAT
 unset MOZ_NO_PIE_COMPAT
--- a/build/unix/mozconfig.unix
+++ b/build/unix/mozconfig.unix
@@ -2,24 +2,32 @@ if [ "x$IS_NIGHTLY" = "xyes" ]; then
   # Some nightlies (eg: Mulet) don't want these set.
   MOZ_AUTOMATION_UPDATE_PACKAGING=${MOZ_AUTOMATION_UPDATE_PACKAGING-1}
 fi
 
 . "$topsrcdir/build/mozconfig.common"
 
 TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
 
-if [ -n "$FORCE_GCC" -o -n "$MOZ_PGO" ]; then
+if [ -n "$FORCE_GCC" ]; then
     CC="$TOOLTOOL_DIR/gcc/bin/gcc"
     CXX="$TOOLTOOL_DIR/gcc/bin/g++"
 
     # We want to make sure we use binutils and other binaries in the tooltool
     # package.
     mk_add_options "export PATH=$TOOLTOOL_DIR/gcc/bin:$PATH"
 else
     CC="$TOOLTOOL_DIR/clang/bin/clang"
     CXX="$TOOLTOOL_DIR/clang/bin/clang++"
     export ENABLE_CLANG_PLUGIN=1
 
+    if [ -n "$MOZ_PGO" ]; then
+        ac_add_options --enable-lto
+        export LLVM_PROFDATA="$TOOLTOOL_DIR/clang/bin/llvm-profdata"
+        export AR="$topsrcdir/clang/bin/llvm-ar"
+        export NM="$topsrcdir/clang/bin/llvm-nm"
+        export RANLIB="$topsrcdir/clang/bin/llvm-ranlib"
+    fi
+
     mk_add_options "export PATH=$TOOLTOOL_DIR/binutils/bin:$PATH"
 fi
 
 . "$topsrcdir/build/unix/mozconfig.stdcxx"
--- a/taskcluster/ci/build/linux.yml
+++ b/taskcluster/ci/build/linux.yml
@@ -19,17 +19,16 @@ linux64/opt:
             - builds/releng_base_linux_64_builds.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         tooltool-downloads: public
         need-xvfb: true
     toolchains:
         - linux64-binutils
         - linux64-clang
-        - linux64-gcc
         - linux64-rust
         - linux64-rust-size
         - linux64-cbindgen
         - linux64-sccache
         - linux64-node
 
 linux64-plain/opt:
     description: "Linux64 Opt Plain"
@@ -103,32 +102,30 @@ linux64/pgo:
     attributes:
         enable-full-crashsymbols: true
     treeherder:
         platform: linux64/pgo
         symbol: B
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 7200
-        env:
-            FORCE_GCC: '1'
     run:
         using: mozharness
         actions: [get-secrets build check-test update]
         options: [enable-pgo]
         config:
             - builds/releng_base_firefox.py
             - builds/releng_base_linux_64_builds.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         tooltool-downloads: public
         need-xvfb: true
     toolchains:
+        - linux64-binutils
         - linux64-clang
-        - linux64-gcc
         - linux64-rust
         - linux64-rust-size
         - linux64-cbindgen
         - linux64-sccache
         - linux64-node
 
 linux64-fuzzing/debug:
     description: "Linux64 Fuzzing Debug"
@@ -239,34 +236,32 @@ linux64-devedition-nightly/opt:
         job-name: linux64-opt
         type: nightly
     treeherder:
         platform: linux64-devedition/opt
         symbol: N
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 7200
-        env:
-            FORCE_GCC: '1'
     run:
         using: mozharness
         actions: [get-secrets build check-test update]
         config:
             - builds/releng_base_firefox.py
             - builds/releng_base_linux_64_builds.py
             - taskcluster_nightly.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         tooltool-downloads: public
         need-xvfb: true
         custom-build-variant-cfg: devedition
     run-on-projects: ['mozilla-beta']
     toolchains:
+        - linux64-binutils
         - linux64-clang
-        - linux64-gcc
         - linux64-rust
         - linux64-rust-size
         - linux64-cbindgen
         - linux64-sccache
         - linux64-node
 
 linux64-base-toolchains/opt:
     description: "Linux64 base toolchains Opt"
@@ -355,17 +350,16 @@ linux/opt:
             - builds/releng_base_linux_32_builds.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         tooltool-downloads: public
         need-xvfb: true
     toolchains:
         - linux64-binutils
         - linux64-clang
-        - linux64-gcc
         - linux64-rust
         - linux64-rust-size
         - linux64-cbindgen
         - linux64-sccache
         - linux64-node
 
 linux/debug:
     description: "Linux32 Debug"
@@ -410,32 +404,30 @@ linux/pgo:
         enable-full-crashsymbols: true
     treeherder:
         platform: linux32/pgo
         symbol: B
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         docker-image: {in-tree: debian7-i386-build}
         max-run-time: 7200
-        env:
-            FORCE_GCC: '1'
     run:
         using: mozharness
         actions: [get-secrets build check-test update]
         options: [enable-pgo]
         config:
             - builds/releng_base_firefox.py
             - builds/releng_base_linux_32_builds.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         tooltool-downloads: public
         need-xvfb: true
     toolchains:
+        - linux64-binutils
         - linux64-clang
-        - linux64-gcc
         - linux64-rust
         - linux64-rust-size
         - linux64-cbindgen
         - linux64-sccache
         - linux64-node
 
 linux-rusttests/opt:
     description: "Linux32 Rust tests Opt"
@@ -522,34 +514,32 @@ linux-devedition-nightly/opt:
         type: nightly
     treeherder:
         platform: linux32-devedition/opt
         symbol: N
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         docker-image: {in-tree: debian7-i386-build}
         max-run-time: 7200
-        env:
-            FORCE_GCC: '1'
     run:
         using: mozharness
         actions: [get-secrets build check-test update]
         config:
             - builds/releng_base_firefox.py
             - builds/releng_base_linux_32_builds.py
             - taskcluster_nightly.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         tooltool-downloads: public
         need-xvfb: true
         custom-build-variant-cfg: devedition
     run-on-projects: ['mozilla-beta']
     toolchains:
+        - linux64-binutils
         - linux64-clang
-        - linux64-gcc
         - linux64-rust
         - linux64-rust-size
         - linux64-cbindgen
         - linux64-sccache
         - linux64-node
 
 linux-nightly/opt:
     description: "Linux32 Nightly"
@@ -564,32 +554,30 @@ linux-nightly/opt:
         type: nightly
     treeherder:
         platform: linux32/opt
         symbol: N
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         docker-image: {in-tree: debian7-i386-build}
         max-run-time: 7200
-        env:
-            FORCE_GCC: '1'
     run:
         using: mozharness
         actions: [get-secrets build check-test update]
         config:
             - builds/releng_base_firefox.py
             - builds/releng_base_linux_32_builds.py
             - taskcluster_nightly.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         tooltool-downloads: public
         need-xvfb: true
     toolchains:
+        - linux64-binutils
         - linux64-clang
-        - linux64-gcc
         - linux64-rust
         - linux64-rust-size
         - linux64-cbindgen
         - linux64-sccache
         - linux64-node
 
 linux64-asan/opt:
     description: "Linux64 Opt ASAN"
@@ -878,32 +866,30 @@ linux64-nightly/opt:
         job-name: linux64-opt
         type: nightly
     treeherder:
         platform: linux64/opt
         symbol: N
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 7200
-        env:
-            FORCE_GCC: '1'
     run:
         using: mozharness
         actions: [get-secrets build check-test update]
         config:
             - builds/releng_base_firefox.py
             - builds/releng_base_linux_64_builds.py
             - taskcluster_nightly.py
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
         tooltool-downloads: public
         need-xvfb: true
     toolchains:
+        - linux64-binutils
         - linux64-clang
-        - linux64-gcc
         - linux64-rust
         - linux64-rust-size
         - linux64-cbindgen
         - linux64-sccache
         - linux64-node
 
 linux64-noopt/debug:
     description: "Linux64 No-optimize Debug"