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.
--- 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