Files
tubestation/testing/docker/rust-build/build_rust_mac.sh
Ralph Giles a313e4dcb1 Bug 1245170 - Upload rust builds to tooltool. r=dustin
Update the gecko-rust-build docker container to upload the
constructed toolchain to tooltool when running on taskcluster,
so it can be used in normal gecko builds (buildbot as well as tc)

Also include a mac build script (which can't run in taskcluster
currently) and a python script for launching the build task from
a local checkout. This is based on Ted's script for building
breakpad's minidump_stackwalk utility.

Matches contents of https://github.com/rillian/rust-build
commit 407c6854e91541341508e96e6a2781434535b7a5
tag v0.2.0
2016-02-16 13:30:19 -08:00

31 lines
713 B
Bash

#!/bin/bash -vex
: WORKSPACE ${WORKSPACE:=$PWD}
CORES=$(nproc || grep -c ^processor /proc/cpuinfo || sysctl -n hw.ncpu)
echo Building on $CORES cpus...
OPTIONS="--enable-rpath --disable-elf-tls --disable-docs"
TARGETS="x86_64-apple-darwin,i686-apple-darwin"
PREFIX=${WORKSPACE}/rustc
mkdir -p ${WORKSPACE}/gecko-rust-mac
pushd ${WORKSPACE}/gecko-rust-mac
export MACOSX_DEPLOYMENT_TARGET=10.7
${WORKSPACE}/rust/configure --prefix=${PREFIX} --target=${TARGETS} ${OPTIONS}
make -j ${CORES}
rm -rf ${PREFIX}
mkdir ${PREFIX}
make dist
make install
popd
# Package the toolchain for upload.
pushd ${WORKSPACE}
tar cvjf rustc.tar.bz2 rustc/*
python tooltool.py add --visibility=public --unpack rustc.tar.bz2
popd