]> git.lizzy.rs Git - rust.git/blob - config.sh
Fix warnings
[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 TARGET_TRIPLE=$(rustc -vV | grep host | cut -d: -f2 | tr -d " ")
14
15 export RUSTFLAGS='-Cpanic=abort -Cdebuginfo=2 -Zpanic-abort-tests -Zcodegen-backend='$(pwd)'/target/'$CHANNEL'/librustc_codegen_cranelift.'$dylib_ext' --sysroot '$(pwd)'/build_sysroot/sysroot'
16
17 # FIXME remove once the atomic shim is gone
18 if [[ `uname` == 'Darwin' ]]; then
19    export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
20 fi
21
22 RUSTC="rustc $RUSTFLAGS -L crate=target/out --out-dir target/out"
23 export RUSTC_LOG=warn # display metadata load errors
24
25 export LD_LIBRARY_PATH="$(pwd)/target/out:$(pwd)/build_sysroot/sysroot/lib/rustlib/$TARGET_TRIPLE/lib"
26 export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
27
28 export CG_CLIF_DISPLAY_CG_TIME=1
29 export CG_CLIF_INCR_CACHE_DISABLED=1