Files
tubestation/testing/docker/rust-build/build_rust.sh
Ralph Giles 407acf2268 Bug 1237366 - Update rust-build docker source. r=dustin
Rename scripts to avoid confict with taskcluster infrastructure.

Matches contents of https://github.com/rillian/rust-build
commit 8eec0128c6787b5266192feb4b3b27713ae0068e
tag v0.1.0
2016-01-22 09:45:25 -08:00

30 lines
674 B
Bash

#!/bin/bash -vex
set -x -e
: WORKSPACE ${WORKSPACE:=/home/worker}
CORES=$(nproc || grep -c ^processor /proc/cpuinfo || sysctl -n hw.ncpu)
set -v
# Configure and build rust.
OPTIONS="--enable-rpath --enable-llvm-static-stdcpp --disable-docs"
x32="i686-unknown-linux-gnu"
x64="x86_64-unknown-linux-gnu"
arm="arm-linux-androideabi"
mkdir -p ${WORKSPACE}/rust-build
pushd ${WORKSPACE}/rust-build
${WORKSPACE}/rust/configure --prefix=${WORKSPACE}/rustc \
--target=${x64},${x32} ${OPTIONS}
make -j ${CORES}
make install
popd
# Package the toolchain for upload.
pushd ${WORKSPACE}
tar cvJf rustc.tar.xz rustc/*
/build/tooltool.py add --visibility=public rustc.tar.xz
popd