Files
tubestation/testing/docker/rust-build/build_rust.sh
Ralph Giles 82f9938e6d Bug 1265817 - Update gecko-rust-build to v0.2.1. r=dustin
- Move to quay.io/rust builder base.
- Set stable channel to work around compatibility checks with upstream
  rust-std builds.
- Updates for stable rust changes.
- Rough repack script for packaging upstream builds for tooltool.

Merge changes from https://github.com/rillian/rust-build tag v0.2.1.

MozReview-Commit-ID: 4rcrUCg2CSw
2016-04-19 10:41:18 -07:00

31 lines
703 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-llvm-static-stdcpp --disable-docs --release-channel=stable"
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 dist
make install
popd
# Package the toolchain for upload.
pushd ${WORKSPACE}
tar cvJf rustc.tar.xz rustc/*
/build/tooltool.py add --visibility=public --unpack rustc.tar.xz
popd