File: 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 (35 lines) | stat: -rw-r--r-- 976 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
28
29
30
31
32
33
34
35
# Note to people running shellcheck: this file should only be sourced, not executed directly.

set -e

unamestr=$(uname)
if [[ "$unamestr" == 'Linux' ]]; then
   dylib_ext='so'
elif [[ "$unamestr" == 'Darwin' ]]; then
   dylib_ext='dylib'
else
   echo "Unsupported os"
   exit 1
fi

if echo "$RUSTC_WRAPPER" | grep sccache; then
echo
echo -e "\x1b[1;93m=== Warning: Unset RUSTC_WRAPPER to prevent interference with sccache ===\x1b[0m"
echo
export RUSTC_WRAPPER=
fi

dir=$(cd "$(dirname "${BASH_SOURCE[0]}")"; pwd)

export RUSTC=$dir"/bin/cg_clif"

export RUSTDOCFLAGS=$linker' -Cpanic=abort -Zpanic-abort-tests '\
'-Zcodegen-backend='$dir'/lib/librustc_codegen_cranelift.'$dylib_ext' --sysroot '$dir

# FIXME remove once the atomic shim is gone
if [[ "$unamestr" == 'Darwin' ]]; then
   export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-undefined -Clink-arg=dynamic_lookup"
fi

export LD_LIBRARY_PATH="$(rustc --print sysroot)/lib:"$dir"/lib"
export DYLD_LIBRARY_PATH=$LD_LIBRARY_PATH