Lines Matching +full:llvm +full:- +full:ranlib
2 set -e
6 echo "wasi-env - Run command with WASI-SDK"
8 echo "wasi-env is a helper to set various environment variables to"
9 echo "run configure and make with WASI-SDK. A WASI-SDK must be either"
10 echo "installed at /opt/wasi-sdk or the env var 'WASI_SDK_PATH' must"
11 echo "set to the root of a WASI-SDK."
13 echo "Usage: wasi-env command [...]"
15 echo " -h --help display this help and exit"
20 -h|--help)
26 if test -z "$1"; then
32 WASI_SDK_PATH="${WASI_SDK_PATH:-/opt/wasi-sdk}"
33 WASI_SYSROOT="${WASI_SDK_PATH}/share/wasi-sysroot"
35 if ! test -x "${WASI_SDK_PATH}/bin/clang"; then
41 CPP="${WASI_SDK_PATH}/bin/clang-cpp"
44 # --sysroot is required if WASI-SDK is not installed in /opt/wasi-sdk.
45 if test "${WASI_SDK_PATH}" != "/opt/wasi-sdk"; then
46 CC="${CC} --sysroot=${WASI_SYSROOT}"
47 CPP="${CPP} --sysroot=${WASI_SYSROOT}"
48 CXX="${CXX} --sysroot=${WASI_SYSROOT}"
52 if command -v ccache >/dev/null 2>&1; then
58 AR="${WASI_SDK_PATH}/bin/llvm-ar"
59 RANLIB="${WASI_SDK_PATH}/bin/ranlib"
61 # instruct pkg-config to use sysroot
69 export CC CPP CXX LDSHARED AR RANLIB