Bug 1464501 - Part 1: Add rust-size toolchain. r=glandium
☠☠ backed out by 6b55a54cf88c ☠ ☠
authorEric Rahm <erahm@mozilla.com>
Thu, 07 Jun 2018 16:47:58 -0700
changeset 479223 e891ab259427a65b92a880478d6884abf0d4a281
parent 479222 1407d2e5084795ba82b66070a27d5dba7544ca16
child 479224 7e85e1b2f6fa2478a79a51700e604b5e0c8a9414
push id1757
push userffxbld-merge
push dateFri, 24 Aug 2018 17:02:43 +0000
treeherdermozilla-release@736023aebdb1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1464501
milestone62.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 1464501 - Part 1: Add rust-size toolchain. r=glandium
taskcluster/ci/toolchain/linux.yml
taskcluster/ci/toolchain/windows.yml
taskcluster/scripts/misc/build-rust-size.sh
--- a/taskcluster/ci/toolchain/linux.yml
+++ b/taskcluster/ci/toolchain/linux.yml
@@ -499,16 +499,35 @@ linux64-sccache:
         using: toolchain-script
         script: build-sccache.sh
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/sccache2.tar.xz
     toolchains:
         - linux64-rust-1.24
 
+linux64-rust-size:
+    description: "rust-size toolchain build"
+    treeherder:
+        kind: build
+        platform: toolchains/opt
+        symbol: TL(rust-size)
+        tier: 1
+    worker-type: aws-provisioner-v1/gecko-{level}-b-linux
+    worker:
+        max-run-time: 1800
+    run:
+        using: toolchain-script
+        script: build-rust-size.sh
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/rust-size.tar.xz
+    toolchains:
+        - linux64-rust-1.24
+
 linux64-gn:
     description: "gn toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TL(gn)
         tier: 1
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
--- a/taskcluster/ci/toolchain/windows.yml
+++ b/taskcluster/ci/toolchain/windows.yml
@@ -209,16 +209,37 @@ win64-sccache:
         using: toolchain-script
         script: build-sccache.sh
         resources:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/sccache2.tar.bz2
     toolchains:
         - win64-rust-1.24
 
+win64-rust-size:
+    description: "rust-size toolchain build"
+    treeherder:
+        kind: build
+        platform: toolchains/opt
+        symbol: TW64(rust-size)
+        tier: 1
+    worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
+    worker:
+        max-run-time: 1800
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/sccache-build.manifest"
+    run:
+        using: toolchain-script
+        script: build-rust-size.sh
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        toolchain-artifact: public/build/rust-size.tar.bz2
+    toolchains:
+        - win64-rust-1.24
+
 win32-gn:
     description: "gn toolchain build"
     treeherder:
         kind: build
         platform: toolchains/opt
         symbol: TW32(gn)
         tier: 1
     worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
new file mode 100755
--- /dev/null
+++ b/taskcluster/scripts/misc/build-rust-size.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+set -x -e -v
+
+OWNER=luser
+PROJECT=rust-size
+PROJECT_REVISION=4a5d9148f50dc037dc230f10b8fc4e5ca00016aa
+
+# This script is for building rust-size
+case "$(uname -s)" in
+Linux)
+    WORKSPACE=$HOME/workspace
+    UPLOAD_DIR=$HOME/artifacts
+    COMPRESS_EXT=xz
+    ;;
+MINGW*)
+    WORKSPACE=$PWD
+    UPLOAD_DIR=$WORKSPACE/public/build
+    WIN_WORKSPACE="$(pwd -W)"
+    COMPRESS_EXT=bz2
+
+    export INCLUDE="$WIN_WORKSPACE/build/src/vs2017_15.4.2/VC/include;$WIN_WORKSPACE/build/src/vs2017_15.4.2/VC/atlmfc/include;$WIN_WORKSPACE/build/src/vs2017_15.4.2/SDK/Include/10.0.15063.0/ucrt;$WIN_WORKSPACE/build/src/vs2017_15.4.2/SDK/Include/10.0.15063.0/shared;$WIN_WORKSPACE/build/src/vs2017_15.4.2/SDK/Include/10.0.15063.0/um;$WIN_WORKSPACE/build/src/vs2017_15.4.2/SDK/Include/10.0.15063.0/winrt;$WIN_WORKSPACE/build/src/vs2017_15.4.2/DIA SDK/include"
+
+    export LIB="$WIN_WORKSPACE/build/src/vs2017_15.4.2/VC/lib/x64;$WIN_WORKSPACE/build/src/vs2017_15.4.2/VC/atlmfc/lib/x64;$WIN_WORKSPACE/build/src/vs2017_15.4.2/SDK/lib/10.0.15063.0/um/x64;$WIN_WORKSPACE/build/src/vs2017_15.4.2/SDK/lib/10.0.15063.0/ucrt/x64;$WIN_WORKSPACE/build/src/vs2017_15.4.2/DIA SDK/lib/amd64"
+
+    PATH="$WORKSPACE/build/src/vs2017_15.4.2/VC/bin/Hostx64/x64:$WORKSPACE/build/src/vs2017_15.4.2/VC/bin/Hostx86/x86:$WORKSPACE/build/src/vs2017_15.4.2/SDK/bin/10.0.15063.0/x64:$WORKSPACE/build/src/vs2017_15.4.2/redist/x64/Microsoft.VC141.CRT:$WORKSPACE/build/src/vs2017_15.4.2/SDK/Redist/ucrt/DLLs/x64:$WORKSPACE/build/src/vs2017_15.4.2/DIA SDK/bin/amd64:$WORKSPACE/build/src/mingw64/bin:$PATH"
+    ;;
+esac
+
+cd $WORKSPACE/build/src
+
+. taskcluster/scripts/misc/tooltool-download.sh
+
+# cargo gets mad if the parent directory has a Cargo.toml file in it
+if [ -e Cargo.toml ]; then
+  mv Cargo.toml Cargo.toml.back
+fi
+
+PATH="$PWD/rustc/bin:$PATH"
+
+git clone -n https://github.com/${OWNER}/${PROJECT} ${PROJECT}
+
+cd $PROJECT
+
+git checkout $PROJECT_REVISION
+
+cargo build --verbose --release
+
+mkdir $PROJECT
+cp target/release/${PROJECT}* ${PROJECT}/
+tar -acf ${PROJECT}.tar.$COMPRESS_EXT $PROJECT
+mkdir -p $UPLOAD_DIR
+cp ${PROJECT}.tar.$COMPRESS_EXT $UPLOAD_DIR
+
+cd ..
+if [ -e Cargo.toml.back ]; then
+  mv Cargo.toml.back Cargo.toml
+fi