Files
tubestation/taskcluster/docker/rust-build/build_cargo.sh
Ralph Giles bcdeb05d35 Bug 1351031 - Update rust-build container. r=mshal
Update rust-build docker image source to v0.4.3. This includes
some recent to how verification and taskcluster work to maintain
working scripts, and some changes for the newer cargo-building-
cargo build system, which aren't sufficient for bootstrapping.

MozReview-Commit-ID: 4IdbKVvco8m
2017-03-27 14:02:44 -07:00

31 lines
629 B
Bash

#!/bin/bash -vex
set -x -e
: WORKSPACE ${WORKSPACE:=/home/worker}
: BRANCH ${BRANCH:=0.15.0}
set -v
# Configure and build cargo.
if test $(uname -s) = "Darwin"; then
export MACOSX_DEPLOYMENT_TARGET=10.7
fi
# Build the initial cargo checkout, which can download a snapshot.
pushd ${WORKSPACE}/cargo
./configure --prefix=${WORKSPACE}/rustc --local-rust-root=${WORKSPACE}/rustc
make
make dist
make install
popd
# Build the version we want.
export PATH=$PATH:${WORKSPACE}/rustc/bin
pushd ${WORKSPACE}/cargo
make clean
git checkout ${BRANCH}
OPENSSL_DIR=/rustroot/cargo64 cargo install --root=${WORKSPACE}/rustc --force
popd