Bug 1386588 - Add a toolchain job for Clang 4. r?gps
new file mode 100644
--- /dev/null
+++ b/build/build-clang/clang-4-linux64.json
@@ -0,0 +1,20 @@
+{
+ "llvm_revision": "305830",
+ "stages": "3",
+ "build_libcxx": true,
+ "build_type": "Release",
+ "assertions": false,
+ "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_401/final",
+ "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_401/final",
+ "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_401/final",
+ "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_401/final",
+ "libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_401/final",
+ "python_path": "/usr/bin/python2.7",
+ "gcc_dir": "/home/worker/workspace/build/src/gcc",
+ "cc": "/home/worker/workspace/build/src/gcc/bin/gcc",
+ "cxx": "/home/worker/workspace/build/src/gcc/bin/g++",
+ "as": "/home/worker/workspace/build/src/gcc/bin/gcc",
+ "patches": [
+ "llvm-debug-frame.patch"
+ ]
+}
--- a/taskcluster/ci/toolchain/linux.yml
+++ b/taskcluster/ci/toolchain/linux.yml
@@ -20,16 +20,38 @@ linux64-clang-3.9:
- 'build/build-clang/build-clang.py'
- 'build/build-clang/clang-3.9-linux64.json'
- 'taskcluster/scripts/misc/tooltool-download.sh'
toolchain-alias: linux64-clang
toolchain-artifact: public/build/clang.tar.xz
toolchains:
- linux64-gcc-4.8
+linux64-clang-4:
+ description: "Clang 4 toolchain build"
+ treeherder:
+ kind: build
+ platform: toolchains/opt
+ symbol: TL(clang4)
+ tier: 1
+ worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+ worker:
+ docker-image: {in-tree: desktop-build}
+ max-run-time: 36000
+ run:
+ using: toolchain-script
+ script: build-clang-4-linux.sh
+ resources:
+ - 'build/build-clang/build-clang.py'
+ - 'build/build-clang/clang-4-linux64.json'
+ - 'taskcluster/scripts/misc/tooltool-download.sh'
+ toolchain-artifact: public/build/clang.tar.xz
+ toolchains:
+ - linux64-gcc-4.8
+
linux64-clang-tidy:
description: "Clang-tidy build"
index:
product: static-analysis
job-name: linux64-clang-tidy
treeherder:
kind: build
platform: toolchains/opt
new file mode 100755
--- /dev/null
+++ b/taskcluster/scripts/misc/build-clang-4-linux.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+set -x -e -v
+
+# This script is for building clang for Linux.
+
+WORKSPACE=$HOME/workspace
+HOME_DIR=$WORKSPACE/build
+UPLOAD_DIR=$HOME/artifacts
+
+cd $HOME_DIR/src
+
+. taskcluster/scripts/misc/tooltool-download.sh
+
+# gets a bit too verbose here
+set +x
+
+cd build/build-clang
+# |mach python| sets up a virtualenv for us!
+../../mach python ./build-clang.py -c clang-4-linux64.json
+
+set -x
+
+# Put a tarball in the artifacts dir
+mkdir -p $UPLOAD_DIR
+cp clang.tar.* $UPLOAD_DIR