Bug 1480631 - Switch Linux builds to clang. r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 08 Aug 2018 07:04:28 +0900
changeset 486943 48b8084995b1390b1f7b2214846ba19e2a55b6b2
parent 486942 7c3423f706f79e09da412dd8be1ea4a58a5265aa
child 486944 5746fe67e2d252035ca8257bd36d6b40d80fde39
push id9719
push userffxbld-merge
push dateFri, 24 Aug 2018 17:49:46 +0000
treeherdermozilla-beta@719ec98fba77 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1480631, 1481670, 1471339
milestone63.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 1480631 - Switch Linux builds to clang. r=froydnj This change switches most CI builds to clang, with a few exceptions: - valgrind builds, until bug 1481670 is figured out. - PGO and nightly builds, until that's fully tested. - coverage builds, per bug 1471339 comment 17. - base toolchain builds, to keep some builds on GCC even when we're fully switched to clang. - any build that doesn't use build/unix/mozconfig.linux (e.g. probably all those driven by autospider.py, maybe others).
build/unix/mozconfig.linux
taskcluster/ci/build/linux.yml
taskcluster/ci/valgrind/kind.yml
--- a/build/unix/mozconfig.linux
+++ b/build/unix/mozconfig.linux
@@ -2,17 +2,21 @@ 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}
 
-# We deal with valgrind builds here
-CC="$TOOLTOOL_DIR/gcc/bin/gcc"
-CXX="$TOOLTOOL_DIR/gcc/bin/g++"
+if [ -n "$FORCE_GCC" ]; then
+    CC="$TOOLTOOL_DIR/gcc/bin/gcc"
+    CXX="$TOOLTOOL_DIR/gcc/bin/g++"
+else
+    CC="$TOOLTOOL_DIR/clang/bin/clang"
+    CXX="$TOOLTOOL_DIR/clang/bin/clang++"
+fi
 
 # 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"
 
 . "$topsrcdir/build/unix/mozconfig.stdcxx"
--- a/taskcluster/ci/build/linux.yml
+++ b/taskcluster/ci/build/linux.yml
@@ -102,16 +102,18 @@ 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"
@@ -135,16 +137,17 @@ linux64-fuzzing/debug:
     treeherder:
         platform: linux64/debug
         symbol: Bf
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 3600
         env:
             PERFHERDER_EXTRA_OPTIONS: fuzzing
+            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
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
@@ -235,16 +238,18 @@ 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"
@@ -270,16 +275,17 @@ linux64-base-toolchains/opt:
     treeherder:
         platform: linux64/opt
         symbol: Bb
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 7200
         env:
             PERFHERDER_EXTRA_OPTIONS: base-toolchains
+            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
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
@@ -301,16 +307,17 @@ linux64-base-toolchains/debug:
     treeherder:
         platform: linux64/debug
         symbol: Bb
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 3600
         env:
             PERFHERDER_EXTRA_OPTIONS: base-toolchains
+            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
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
@@ -401,16 +408,18 @@ 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"
@@ -511,16 +520,18 @@ 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"
@@ -551,16 +562,18 @@ 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"
@@ -826,16 +839,18 @@ 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"
@@ -1028,16 +1043,18 @@ linux64-ccov/debug:
     treeherder:
         platform: linux64-ccov/debug
         symbol: B
         tier: 2
     run-on-projects: ['mozilla-central', 'try']
     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
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
@@ -1060,16 +1077,18 @@ linux64-ccov/opt:
     treeherder:
         platform: linux64-ccov/opt
         symbol: B
         tier: 2
     run-on-projects: ['mozilla-central', 'try']
     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
         script: "mozharness/scripts/fx_desktop_build.py"
         secrets: true
--- a/taskcluster/ci/valgrind/kind.yml
+++ b/taskcluster/ci/valgrind/kind.yml
@@ -26,16 +26,17 @@ jobs:
             kind: build
             tier: 1
         worker-type: aws-provisioner-v1/gecko-{level}-b-linux
         worker:
             docker-image: {in-tree: valgrind-build}
             max-run-time: 72000
             env:
                 PERFHERDER_EXTRA_OPTIONS: valgrind
+                FORCE_GCC: '1'
         run:
             using: mozharness
             actions: [get-secrets build valgrind-test]
             custom-build-variant-cfg: valgrind
             config:
                 - builds/releng_base_firefox.py
                 - builds/releng_base_linux_64_builds.py
             script: "mozharness/scripts/fx_desktop_build.py"