Bug 1540082 - add an aarch64-cross clang build; r=nalexander
authorNathan Froyd <froydnj@mozilla.com>
Mon, 22 Apr 2019 22:11:12 +0000
changeset 530209 6cbad9f5b259fb156e93d30a66298fd2a93ae46b
parent 530208 9f95b1b2f9e11690859f415e0ceceba7b0e5b403
child 530210 3791fc50da340ff41e78eedf892454b395e47617
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1540082
milestone68.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 1540082 - add an aarch64-cross clang build; r=nalexander Analogously to the existing `linux64-clang-8-android-cross` build, this build is a linux x86-64 build with runtime library support for aarch64. Depends on D28405 Differential Revision: https://phabricator.services.mozilla.com/D28406
build/build-clang/clang-8-linux64-aarch64-cross.json
taskcluster/ci/toolchain/clang.yml
taskcluster/scripts/misc/build-clang-8-linux-aarch64-cross.sh
new file mode 100644
--- /dev/null
+++ b/build/build-clang/clang-8-linux64-aarch64-cross.json
@@ -0,0 +1,27 @@
+{
+    "llvm_revision": "356365",
+    "stages": "3",
+    "build_libcxx": true,
+    "build_type": "Release",
+    "assertions": false,
+    "llvm_repo": "https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_800/final",
+    "clang_repo": "https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_800/final",
+    "lld_repo": "https://llvm.org/svn/llvm-project/lld/tags/RELEASE_800/final",
+    "compiler_repo": "https://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_800/final",
+    "libcxx_repo": "https://llvm.org/svn/llvm-project/libcxx/tags/RELEASE_800/final",
+    "libcxxabi_repo": "https://llvm.org/svn/llvm-project/libcxxabi/tags/RELEASE_800/final",
+    "python_path": "/usr/bin/python2.7",
+    "gcc_dir": "/builds/worker/workspace/build/src/gcc",
+    "cc": "/builds/worker/workspace/build/src/gcc/bin/gcc",
+    "cxx": "/builds/worker/workspace/build/src/gcc/bin/g++",
+    "as": "/builds/worker/workspace/build/src/gcc/bin/gcc",
+    "extra_targets": [
+      "aarch64-unknown-linux-gnu"
+    ],
+    "patches": [
+      "static-llvm-symbolizer.patch",
+      "find_symbolizer_linux.patch",
+      "rename_gcov_flush.patch",
+      "android-mangling-error.patch"
+    ]
+}
--- a/taskcluster/ci/toolchain/clang.yml
+++ b/taskcluster/ci/toolchain/clang.yml
@@ -101,16 +101,36 @@ linux64-clang-8-android-cross:
             - 'build/build-clang/clang-8-android.json'
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-alias: linux64-clang-android-cross
         toolchain-artifact: public/build/clang.tar.xz
     toolchains:
         - linux64-gcc-6
         - linux64-android-ndk-linux-repack
 
+linux64-clang-8-aarch64-cross:
+    description: "Clang 8 toolchain build with aarch64 runtime"
+    treeherder:
+        symbol: TL(clang8-aarch64)
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 3600
+        docker-image: {in-tree: toolchain-arm64-build}
+    run:
+        using: toolchain-script
+        script: build-clang-8-linux-aarch64-cross.sh
+        resources:
+            - 'build/build-clang/clang-8-linux64-aarch64-cross.json'
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-alias: linux64-aarch64-cross
+        toolchain-artifact: public/build/clang.tar.xz
+    toolchains:
+        - linux64-binutils
+        - linux64-gcc-6
+
 linux64-clang-8-macosx-cross:
     description: "Clang 8 toolchain build with MacOS Compiler RT libs"
     treeherder:
         symbol: TL(clang8-macosx-cross)
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 3600
         env:
new file mode 100755
--- /dev/null
+++ b/taskcluster/scripts/misc/build-clang-8-linux-aarch64-cross.sh
@@ -0,0 +1,27 @@
+#!/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
+
+export PATH="$WORKSPACE/build/src/binutils/bin:$PATH"
+
+# 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-8-linux64-aarch64-cross.json
+
+set -x
+
+# Put a tarball in the artifacts dir
+mkdir -p $UPLOAD_DIR
+cp clang.tar.* $UPLOAD_DIR