Bug 1272629 - Add taskcluster task to build binutils package. r=glandium
☠☠ backed out by d14e19de0a1e ☠ ☠
authorEnes Goktas <egoktas@mozilla.com>
Sat, 16 Jul 2016 00:16:36 -0700
changeset 346252 86d07e6bd5b7197f249e5064ee600fe83b808fb1
parent 346251 66c7af8b26544e79b39b7180cb7338bbc2642064
child 346253 4baf0f3644aae5a52847a2f2edbe33034847d02f
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1272629
milestone50.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 1272629 - Add taskcluster task to build binutils package. r=glandium MozReview-Commit-ID: HxM7MzUDG5j
build/unix/build-binutils/build-binutils.sh
taskcluster/ci/legacy/tasks/branches/base_jobs.yml
taskcluster/ci/legacy/tasks/builds/linux64_binutils.yml
taskcluster/scripts/misc/build-binutils-linux.sh
new file mode 100755
--- /dev/null
+++ b/build/unix/build-binutils/build-binutils.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+binutils_version=2.25.1
+make_flags='-j12'
+
+root_dir="$1"
+if [ -z "$root_dir" -o ! -d "$root_dir" ]; then
+  root_dir=$(mktemp -d)
+fi
+cd $root_dir
+
+if test -z $TMPDIR; then
+  TMPDIR=/tmp/
+fi
+
+# Download the source of the specified version of binutils
+wget -c -P $TMPDIR ftp://ftp.gnu.org/gnu/binutils/binutils-${binutils_version}.tar.bz2 || exit 1
+tar xjf $TMPDIR/binutils-${binutils_version}.tar.bz2
+
+# Build binutils
+mkdir binutils-objdir
+cd binutils-objdir
+
+../binutils-$binutils_version/configure --prefix /tools/binutils/ --enable-gold --enable-plugins --disable-nls || exit 1
+make $make_flags || exit 1
+make install $make_flags DESTDIR=$root_dir || exit 1
+
+cd ..
+
+# Make a package of the built binutils
+cd $root_dir/tools
+tar caf $root_dir/binutils.tar.xz binutils/
--- a/taskcluster/ci/legacy/tasks/branches/base_jobs.yml
+++ b/taskcluster/ci/legacy/tasks/branches/base_jobs.yml
@@ -340,8 +340,15 @@ tasks:
           - 'taskcluster/scripts/misc/build-gcc-linux.sh'
   linux64-clang:
     task: tasks/builds/linux64_clang.yml
     root: true
     when:
         file_patterns:
           - 'build/build-clang/**'
           - 'taskcluster/scripts/misc/build-clang-linux.sh'
+  linux64-binutils:
+    task: tasks/builds/linux64_binutils.yml
+    root: true
+    when:
+        file_patterns:
+          - 'build/unix/build-binutils/**'
+          - 'taskcluster/scripts/misc/build-binutils-linux.sh'
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/legacy/tasks/builds/linux64_binutils.yml
@@ -0,0 +1,45 @@
+$inherits:
+  from: 'tasks/builds/firefox_docker_base.yml'
+  variables:
+    build_name: 'linux64-binutils'
+    build_type: 'opt'
+task:
+  metadata:
+    name: '[TC] binutils'
+    description: 'binutils'
+
+  workerType: opt-linux64
+
+  routes:
+    - 'index.buildbot.branches.{{project}}.binutils'
+    - 'index.buildbot.revisions.{{head_rev}}.{{project}}.binutils'
+
+  payload:
+    env:
+      MOZHARNESS_DISABLE: 'true'
+      TOOLS_DISABLE: 'true'
+
+    maxRunTime: 36000
+
+    command: ["/bin/bash", "-c", "cd /home/worker/ && ./bin/checkout-sources.sh && ./workspace/build/src/taskcluster/scripts/misc/build-binutils-linux.sh" ]
+
+    artifacts:
+      'public/binutils.tar.xz':
+        type: file
+        path: '/home/worker/workspace/artifacts/binutils.tar.xz'
+        expires:
+          relative-datestamp: "1 year"
+
+  extra:
+    treeherderEnv:
+      - staging
+      - production
+    treeherder:
+      groupSymbol: Cc
+      groupName: Compilers, submitted by taskcluster
+      symbol: binutils
+      machine:
+        platform: linux64
+    locations:
+        build: null
+        tests: null
new file mode 100755
--- /dev/null
+++ b/taskcluster/scripts/misc/build-binutils-linux.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+set -x -e -v
+
+# This script is for building binutils for Linux.
+
+WORKSPACE=$HOME/workspace
+HOME_DIR=$WORKSPACE/build
+UPLOAD_DIR=$WORKSPACE/artifacts
+
+cd $HOME_DIR/src
+
+build/unix/build-binutils/build-binutils.sh $HOME_DIR
+
+# Put a tarball in the artifacts dir
+mkdir -p $UPLOAD_DIR
+cp $HOME_DIR/binutils.tar.* $UPLOAD_DIR