4 if [[ "$unamestr" == 'Linux' ]]; then
6 elif [[ "$unamestr" == 'Darwin' ]]; then
13 HOST_TRIPLE=$(rustc -vV | grep host | cut -d: -f2 | tr -d " ")
14 TARGET_TRIPLE=$HOST_TRIPLE
15 #TARGET_TRIPLE="x86_64-pc-windows-gnu"
16 #TARGET_TRIPLE="aarch64-unknown-linux-gnu"
20 export JIT_SUPPORTED=1
21 if [[ "$HOST_TRIPLE" != "$TARGET_TRIPLE" ]]; then
22 export JIT_SUPPORTED=0
23 if [[ "$TARGET_TRIPLE" == "aarch64-unknown-linux-gnu" ]]; then
24 # We are cross-compiling for aarch64. Use the correct linker and run tests in qemu.
25 linker='-Clinker=aarch64-linux-gnu-gcc'
26 RUN_WRAPPER='qemu-aarch64 -L /usr/aarch64-linux-gnu'
27 elif [[ "$TARGET_TRIPLE" == "x86_64-pc-windows-gnu" ]]; then
28 # We are cross-compiling for Windows. Run tests in wine.
31 echo "Unknown non-native platform"
35 export RUSTFLAGS=$linker' -Cpanic=abort -Cdebuginfo=2 -Zpanic-abort-tests -Zcodegen-backend='$(pwd)'/target/'$CHANNEL'/librustc_codegen_cranelift.'$dylib_ext' --sysroot '$(pwd)'/build_sysroot/sysroot'
36 export RUSTDOCFLAGS=$RUSTFLAGS
38 # FIXME remove once the atomic shim is gone
39 if [[ `uname` == 'Darwin' ]]; then
40 export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
43 export RUSTC_LOG=warn # display metadata load errors
45 export LD_LIBRARY_PATH="$(pwd)/target/out:$(pwd)/build_sysroot/sysroot/lib/rustlib/$TARGET_TRIPLE/lib"
46 export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
48 export CG_CLIF_DISPLAY_CG_TIME=1