- 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
31 lines
698 B
Bash
31 lines
698 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="--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
|