testing/docker/rust-build/build_rust_mac.sh
author Sebastian Hengst <archaeopteryx@coole-files.de>
Mon, 19 Dec 2016 21:15:07 +0100
changeset 354459 9d0c5328c89782f32bb458487278944bf219a417
parent 354455 taskcluster/docker/rust-build/build_rust_mac.sh@fe7303de56be76914f0eebe008b0ef02c803b6cd
child 354523 0f3603e365f029bc9ea5f926d32f6f0f8aa4d998
permissions -rw-r--r--
Backed out changeset fe7303de56be (bug 1302763) for failing webdriver tests on Linux x64 debug (geckodriver.manifest fetch failed). r=backout

#!/bin/bash -vex

set -e

: WORKSPACE ${WORKSPACE:=$PWD}
: TOOLTOOL ${TOOLTOOL:=python $WORKSPACE/tooltool.py}

CORES=$(nproc || grep -c ^processor /proc/cpuinfo || sysctl -n hw.ncpu)
echo Building on $CORES cpus...

OPTIONS="--enable-debuginfo --disable-docs"
TARGETS="x86_64-apple-darwin,i686-apple-darwin"

PREFIX=${WORKSPACE}/rustc

set -v

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}
rustc/bin/rustc --version
tar cvjf rustc.tar.bz2 rustc/*
${TOOLTOOL} add --visibility=public --unpack rustc.tar.bz2
popd