- 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
703 B
Bash
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
|