mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 12:51:09 +02:00
- Separate build, package, and upload steps into separate scripts. - Rewrite repack in python to use rust's internal install scripts. - Add support for cargo as well as the rust compiler and std library. MozReview-Commit-ID: EI9M8ayEptA --HG-- extra : rebase_source : 4457c074396e5c733158d304c2aebe0f811a9d7e
26 lines
588 B
Bash
26 lines
588 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"
|
|
OPTIONS+="--enable-debuginfo"
|
|
OPTIONS+="--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
|