Bug 1430315 - Add a toolchain job to build llvm-dsymutil independently. r=rillian
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 16 Jan 2018 16:23:33 +0900
changeset 453849 aee6cb0464d79fe892e526fc566e2f96629da61c
parent 453848 f15b8a999a451caf5ac225f6c522beadc509c605
child 453850 fb5c087381a6f8027b9bb804ea9cc2927b809626
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrillian
bugs1430315, 1409265, 1410148
milestone59.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 1430315 - Add a toolchain job to build llvm-dsymutil independently. r=rillian We've had problems with crashes in llvm-dsymutil for a while, and while they are, in essence, due to the fact that rustc produces bad debug info, they are a hurdle to our builds. The tool comes along clang, and updating clang is not necessarily easy (witness bug 1409265), so, so far, we've relied on backporting fixes, which can be time confusing (witness bug 1410148). OTOH, llvm-dsymutil is a rather specific tool, that doesn't strictly need to be tied to clang. It's only tied to it because it uses the llvm code to do some of the things it does, and it's part of the llvm source tree. But it could just as well be a separate tool, like it was(is?) on OSX. So, we add a toolchain job to build it from the llvm source, independently from clang, so that we can update it separately, if we hit new crashes that happen to already be fixed on llvm trunk. It will also allow to more easily update after upstream fixes crashes after we report them.
taskcluster/ci/toolchain/linux.yml
taskcluster/scripts/misc/build-llvm-dsymutil.sh
--- a/taskcluster/ci/toolchain/linux.yml
+++ b/taskcluster/ci/toolchain/linux.yml
@@ -166,16 +166,33 @@ linux64-sixgill:
         script: build-gcc-sixgill-plugin-linux.sh
         resources:
             - 'build/unix/build-gcc/build-gcc.sh'
             - 'taskcluster/scripts/misc/build-gcc-sixgill-plugin-linux.sh'
         toolchain-artifact: public/build/sixgill.tar.xz
     toolchains:
         - linux64-gcc-4.9
 
+linux64-llvm-dsymutil:
+    description: "llvm-dsymutil toolchain build"
+    treeherder:
+        kind: build
+        platform: toolchains/opt
+        symbol: TL(dsymutil)
+        tier: 1
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 1800
+    run:
+        using: toolchain-script
+        script: build-llvm-dsymutil.sh
+        toolchain-artifact: public/build/llvm-dsymutil.tar.xz
+    toolchains:
+        - linux64-gcc-4.9
+
 linux64-binutils:
     description: "Binutils toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(binutil)
         tier: 1
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
new file mode 100755
--- /dev/null
+++ b/taskcluster/scripts/misc/build-llvm-dsymutil.sh
@@ -0,0 +1,38 @@
+#!/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
+
+git clone -n https://github.com/llvm-mirror/llvm
+
+cd llvm
+git checkout 4727bc748a48e46824eae55a81ae890cd25c3a34
+
+mkdir build
+cd build
+
+cmake \
+  -GNinja \
+  -DCMAKE_BUILD_TYPE=Release \
+  -DLLVM_TARGETS_TO_BUILD=X86 \
+  -DCMAKE_C_COMPILER=$HOME_DIR/src/gcc/bin/gcc \
+  ..
+
+export LD_LIBRARY_PATH=$HOME_DIR/src/gcc/lib64
+
+ninja llvm-dsymutil
+
+strip bin/llvm-dsymutil
+
+tar --xform='s,^,llvm-dsymutil/,' -Jcf llvm-dsymutil.tar.xz bin/llvm-dsymutil
+
+mkdir -p $UPLOAD_DIR
+cp llvm-dsymutil.tar.xz $UPLOAD_DIR