fune/taskcluster/scripts/misc/build-rust-size.sh
Nathan Froyd 8bf888eb87 Bug 1654292 - remove Cargo.toml hacks from toolchain build scripts; r=firefox-build-system-reviewers,rstewart
I suspect these were an artifact of building the checked-out repository
inside the Firefox source directory, but that is not a problem anymore.

Differential Revision: https://phabricator.services.mozilla.com/D84363
2020-07-21 17:04:49 +00:00

39 lines
726 B
Bash
Executable file

#!/bin/bash
set -x -e -v
PROJECT=rust-size
# This script is for building rust-size
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
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 ..
. $GECKO_PATH/taskcluster/scripts/misc/vs-cleanup.sh