]> git.lizzy.rs Git - rust.git/blob - config.sh
Rustup to rustc 1.34.0-nightly (f66e4697a 2019-02-20)
[rust.git] / config.sh
1 set -e
2
3 unamestr=`uname`
4 if [[ "$unamestr" == 'Linux' ]]; then
5    dylib_ext='so'
6 elif [[ "$unamestr" == 'Darwin' ]]; then
7    dylib_ext='dylib'
8 else
9    echo "Unsupported os"
10    exit 1
11 fi
12
13 if [[ "$1" == "--release" ]]; then
14     channel='release'
15     cargo build --release
16 else
17     channel='debug'
18     cargo build
19 fi
20
21 export RUSTFLAGS='-Zalways-encode-mir -Cpanic=abort -Cdebuginfo=2 -Zcodegen-backend='$(pwd)'/target/'$channel'/librustc_codegen_cranelift.'$dylib_ext
22 RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"