Bug 1594344 - Part 1: Add dump_syms toolchain. r=froydnj
authorEric Rahm <erahm@mozilla.com>
Fri, 13 Dec 2019 10:26:49 +0000
changeset 506854 d32da5fc94823e270bd0ac201bb65dafa6b470b9
parent 506853 aea23435804b56798dbae8fa46dfccb8cbdca131
child 506855 8514ded81b7734b025db53ce98e9ad7df67dc35c
push id36913
push useropoprus@mozilla.com
push dateFri, 13 Dec 2019 16:53:24 +0000
treeherdermozilla-central@1ed684598bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1594344
milestone73.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 1594344 - Part 1: Add dump_syms toolchain. r=froydnj This defines a new `dump_syms` toolchain that uses the rust implementation of `dump_syms`. Differential Revision: https://phabricator.services.mozilla.com/D53318
taskcluster/ci/fetch/toolchains.yml
taskcluster/ci/toolchain/dump-syms.yml
taskcluster/ci/toolchain/kind.yml
taskcluster/scripts/misc/build-dump-syms.sh
--- a/taskcluster/ci/fetch/toolchains.yml
+++ b/taskcluster/ci/fetch/toolchains.yml
@@ -444,8 +444,15 @@ cmake:
         add-prefix: cmake/
 
 lucetc-source:
     description: lucetc source code
     fetch:
         type: git
         repo: https://github.com/PLSysSec/lucet_sandbox_compiler/
         revision: 5c22392b5b1aaa60e915c75e92b57391e1e61e6d
+
+dump-syms:
+    description: dump_syms source code
+    fetch:
+        type: git
+        repo: https://github.com/mozilla/dump_syms/
+        revision: f325cff44c945af981c08367bdab12f8e0e2064b
new file mode 100644
--- /dev/null
+++ b/taskcluster/ci/toolchain/dump-syms.yml
@@ -0,0 +1,39 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+---
+job-defaults:
+    description: "dump_syms toolchain build"
+    worker:
+        max-run-time: 1800
+    run:
+        script: build-dump-syms.sh
+    fetches:
+        fetch:
+            - dump-syms
+
+linux64-dump-syms:
+    treeherder:
+        symbol: TL(dump_syms)
+    worker-type: b-linux
+    run:
+        toolchain-artifact: public/build/dump_syms.tar.xz
+    fetches:
+        toolchain:
+            - linux64-rust
+
+win64-dump-syms:
+    treeherder:
+        symbol: TW64(dump_syms)
+    worker-type: b-win2012
+    worker:
+        env:
+            TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/win64/vs2017.manifest"
+    run:
+        toolchain-artifact: public/build/dump_syms.tar.bz2
+        resources:
+            - 'taskcluster/scripts/misc/tooltool-download.sh'
+        tooltool-downloads: internal
+    fetches:
+        toolchain:
+            - win64-rust
--- a/taskcluster/ci/toolchain/kind.yml
+++ b/taskcluster/ci/toolchain/kind.yml
@@ -23,16 +23,17 @@ job-defaults:
         using: toolchain-script
 
 jobs-from:
     - android.yml
     - cbindgen.yml
     - cctools-port.yml
     - clang-tidy.yml
     - clang.yml
+    - dump-syms.yml
     - gcc.yml
     - geckodriver.yml
     - gn.yml
     - grcov.yml
     - mingw.yml
     - minidump_stackwalk.yml
     - misc.yml
     - nasm.yml
new file mode 100644
--- /dev/null
+++ b/taskcluster/scripts/misc/build-dump-syms.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+set -x -e -v
+
+PROJECT=dump_syms
+
+# This script is for building dump_syms
+case "$(uname -s)" in
+Linux)
+    COMPRESS_EXT=xz
+    ;;
+MINGW*)
+    UPLOAD_DIR=$PWD/public/build
+    COMPRESS_EXT=bz2
+
+    . $GECKO_PATH/taskcluster/scripts/misc/vs-setup.sh
+    ;;
+esac
+
+cd $GECKO_PATH
+
+if [ -n "$TOOLTOOL_MANIFEST" ]; then
+  . taskcluster/scripts/misc/tooltool-download.sh
+fi
+
+# 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="$(cd $MOZ_FETCHES_DIR && pwd)/rustc/bin:$PATH"
+
+cd $MOZ_FETCHES_DIR/$PROJECT
+
+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
+
+. $GECKO_PATH/taskcluster/scripts/misc/vs-cleanup.sh