Bug 1408284 - Build sccache with gcc instead of clang. r?ted draft
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 13 Oct 2017 14:27:13 +0900
changeset 679884 1cc17587e38637d50a811604787467e6adcca475
parent 679629 25aad10380b10b6efa50c2b4d97245f078d870a0
child 735699 9a64a9c23cabe8b7953eebe0c3b1f2bc2fc6a851
push id84331
push userbmo:mh+mozilla@glandium.org
push dateFri, 13 Oct 2017 06:26:26 +0000
reviewersted
bugs1408284, 1381772
milestone58.0a1
Bug 1408284 - Build sccache with gcc instead of clang. r?ted When adding sccache toolchain jobs in bug 1381772, building with gcc failed, and building with clang worked, so I just went with the path of least resistance. That's however a suboptimal position in the dependency graph, so it's still preferable to use gcc if possible. Looking exactly how it fails, it turns out it's because without CC being set, ring wants to build with "cc", which ends up being the system gcc instead of ours (our gcc archive doesn't provide "cc", only "gcc"), and it is too old to support the compiler flags ring uses. So setting CC does the trick.
taskcluster/ci/toolchain/linux.yml
taskcluster/scripts/misc/build-sccache.sh
--- a/taskcluster/ci/toolchain/linux.yml
+++ b/taskcluster/ci/toolchain/linux.yml
@@ -275,17 +275,17 @@ linux64-sccache:
         max-run-time: 36000
     run:
         using: toolchain-script
         script: build-sccache.sh
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/sccache2.tar.xz
     toolchains:
-        - linux64-clang-3.9
+        - linux64-gcc-4.9
         - linux64-rust-1.19
 
 linux64-gn:
     description: "gn toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(gn)
--- a/taskcluster/scripts/misc/build-sccache.sh
+++ b/taskcluster/scripts/misc/build-sccache.sh
@@ -4,18 +4,18 @@ set -x -e -v
 SCCACHE_REVISION=df04fa530d6b7d79fef8c848879d47dcc4d95b32
 
 # This script is for building sccache
 
 case "$(uname -s)" in
 Linux)
     WORKSPACE=$HOME/workspace
     UPLOAD_DIR=$HOME/artifacts
-    export CC=clang
-    PATH="$WORKSPACE/build/src/clang/bin:$PATH"
+    export CC=gcc
+    PATH="$WORKSPACE/build/src/gcc/bin:$PATH"
     COMPRESS_EXT=xz
     ;;
 MINGW*)
     WORKSPACE=$PWD
     UPLOAD_DIR=$WORKSPACE/public/build
     WIN_WORKSPACE="$(pwd -W)"
     COMPRESS_EXT=bz2