summaryrefslogtreecommitdiffstats
path: root/testing/docker/rust-build/build_rust_mac.sh
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/docker/rust-build/build_rust_mac.sh
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/docker/rust-build/build_rust_mac.sh')
-rw-r--r--testing/docker/rust-build/build_rust_mac.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/docker/rust-build/build_rust_mac.sh b/testing/docker/rust-build/build_rust_mac.sh
new file mode 100644
index 000000000..a6d44f6dd
--- /dev/null
+++ b/testing/docker/rust-build/build_rust_mac.sh
@@ -0,0 +1,36 @@
+#!/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