The wasm_build.sh script is now more resilient to failures in finding llvm-dwarfdump
This commit is contained in:
parent
f59c4509ea
commit
2dbd793878
@ -15,13 +15,13 @@ if [ -f /usr/local/opt/llvm/bin/llvm-dwarfdump ]; then
|
|||||||
elif [ -f /opt/homebrew/llvm/bin/llvm-dwarfdump ]; then
|
elif [ -f /opt/homebrew/llvm/bin/llvm-dwarfdump ]; then
|
||||||
DWARFDUMP=/opt/homebrew/llvm/bin/llvm-dwarfdump
|
DWARFDUMP=/opt/homebrew/llvm/bin/llvm-dwarfdump
|
||||||
else
|
else
|
||||||
DWARFDUMP=`which llvm-dwarfdump`
|
# some systems may have the major LLVM version suffixed on the LLVM binaries - and we need `true` at the end because the whole script will fail with a nonzero return if something goes wrong here
|
||||||
|
DWARFDUMP=`which llvm-dwarfdump || find ${PATH//:/\/ } -name 'llvm-dwarfdump*' 2>/dev/null | head -n1 || true`
|
||||||
if [[ "${DWARFDUMP}" == "" ]]; then
|
if [[ "${DWARFDUMP}" == "" ]]; then
|
||||||
echo llvm-dwarfdump not found
|
echo "llvm-dwarfdump not found"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [[ "$1" == "release" ]]; then
|
if [[ "$1" == "release" ]]; then
|
||||||
OUTPUTDIR=../target/wasm32-unknown-unknown/release/pkg
|
OUTPUTDIR=../target/wasm32-unknown-unknown/release/pkg
|
||||||
INPUTDIR=../target/wasm32-unknown-unknown/release
|
INPUTDIR=../target/wasm32-unknown-unknown/release
|
||||||
|
Loading…
Reference in New Issue
Block a user