1212 exit 1
1313fi
1414
15- HOST_TRIPLE=$( rustc -vV | grep host | cut -d: -f2 | tr -d " " )
16- TARGET_TRIPLE=$HOST_TRIPLE
17- # TARGET_TRIPLE="x86_64-pc-windows-gnu"
18- # TARGET_TRIPLE="aarch64-unknown-linux-gnu"
19-
20- linker=' '
21- RUN_WRAPPER=' '
22- export JIT_SUPPORTED=1
23- if [[ " $HOST_TRIPLE " != " $TARGET_TRIPLE " ]]; then
24- export JIT_SUPPORTED=0
25- if [[ " $TARGET_TRIPLE " == " aarch64-unknown-linux-gnu" ]]; then
26- # We are cross-compiling for aarch64. Use the correct linker and run tests in qemu.
27- linker=' -Clinker=aarch64-linux-gnu-gcc'
28- RUN_WRAPPER=' qemu-aarch64 -L /usr/aarch64-linux-gnu'
29- elif [[ " $TARGET_TRIPLE " == " x86_64-pc-windows-gnu" ]]; then
30- # We are cross-compiling for Windows. Run tests in wine.
31- RUN_WRAPPER=' wine'
32- else
33- echo " Unknown non-native platform"
34- fi
35- fi
36-
3715if echo " $RUSTC_WRAPPER " | grep sccache; then
3816echo
3917echo -e " \x1b[1;93m=== Warning: Unset RUSTC_WRAPPER to prevent interference with sccache ===\x1b[0m"
@@ -45,18 +23,13 @@ dir=$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)
4523
4624export RUSTC=$dir " /bin/cg_clif"
4725
48- if [ ! -z $linker ]; then
49- export RUSTFLAGS=$linker " " $RUSTFLAGS
50- fi
51-
5226export RUSTDOCFLAGS=$linker ' -Cpanic=abort -Zpanic-abort-tests ' \
5327' -Zcodegen-backend=' $dir ' /lib/librustc_codegen_cranelift.' $dylib_ext ' --sysroot ' $dir
5428
5529# FIXME remove once the atomic shim is gone
56- if [[ $( uname ) == ' Darwin' ]]; then
30+ if [[ " $unamestr " == ' Darwin' ]]; then
5731 export RUSTFLAGS=" $RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
5832fi
5933
6034export LD_LIBRARY_PATH=" $( rustc --print sysroot) /lib:" $dir " /lib"
6135export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH
62-
0 commit comments