1 # Note to people running shellcheck: this file should only be sourced, not executed directly.
6 if [[ "$unamestr" == 'Linux' ]]; then
8 elif [[ "$unamestr" == 'Darwin' ]]; then
15 if echo "$RUSTC_WRAPPER" | grep sccache; then
17 echo -e "\x1b[1;93m=== Warning: Unset RUSTC_WRAPPER to prevent interference with sccache ===\x1b[0m"
22 dir=$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)
24 export RUSTC=$dir"/bin/cg_clif"
26 export RUSTDOCFLAGS=$linker' -Cpanic=abort -Zpanic-abort-tests '\
27 '-Zcodegen-backend='$dir'/lib/librustc_codegen_cranelift.'$dylib_ext' --sysroot '$dir
29 # FIXME remove once the atomic shim is gone
30 if [[ "$unamestr" == 'Darwin' ]]; then
31 export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
34 export LD_LIBRARY_PATH="$(rustc --print sysroot)/lib:"$dir"/lib"
35 export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH