File: ext_config.sh

package info (click to toggle)
rustc-mozilla 1.51.0%2Bdfsg1-1~deb10u2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,267,560 kB
  • sloc: xml: 147,950; sh: 17,592; ansic: 16,886; javascript: 7,153; python: 6,231; cpp: 4,693; makefile: 3,453; asm: 1,437; ruby: 68; awk: 12
file content (27 lines) | stat: -rw-r--r-- 1,010 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Note to people running shellcheck: this file should only be sourced, not executed directly.

# Various env vars that should only be set for the build system but not for cargo.sh

set -e

export CG_CLIF_DISPLAY_CG_TIME=1
export CG_CLIF_INCR_CACHE_DISABLED=1

export HOST_TRIPLE=$(rustc -vV | grep host | cut -d: -f2 | tr -d " ")
export TARGET_TRIPLE=${TARGET_TRIPLE:-$HOST_TRIPLE}

export RUN_WRAPPER=''
export JIT_SUPPORTED=1
if [[ "$HOST_TRIPLE" != "$TARGET_TRIPLE" ]]; then
   export JIT_SUPPORTED=0
   if [[ "$TARGET_TRIPLE" == "aarch64-unknown-linux-gnu" ]]; then
      # We are cross-compiling for aarch64. Use the correct linker and run tests in qemu.
      export RUSTFLAGS='-Clinker=aarch64-linux-gnu-gcc '$RUSTFLAGS
      export RUN_WRAPPER='qemu-aarch64 -L /usr/aarch64-linux-gnu'
   elif [[ "$TARGET_TRIPLE" == "x86_64-pc-windows-gnu" ]]; then
      # We are cross-compiling for Windows. Run tests in wine.
      export RUN_WRAPPER='wine'
   else
      echo "Unknown non-native platform"
   fi
fi