Skip to content

Commit

Permalink
Merge branch 'main' into RemoveRedundantTypeCast
Browse files Browse the repository at this point in the history
  • Loading branch information
erfangnu authored May 26, 2024
2 parents ef7c897 + 183d907 commit 131385b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions b.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,24 @@ if [ -e "$OUTPUT_FILE" ]; then
rm "$OUTPUT_FILE"
fi


ldconfig -p | grep efence &>/dev/null
if ! [ $? -eq 0 ]; then
echo "efence library is missing"
echo "Install efence - Electric Fence Malloc Debugger"
exit 1
fi

# Compile
# gcc -g -ggdb -o "$OUTPUT_FILE" "$INPUT_FILE"
gcc -g -fsanitize=undefined,address -Walloca -o "$OUTPUT_FILE" "$INPUT_FILE" -lefence

if ! [ -x "$(command -v emcc)" ]; then
echo 'Error: emcc is not installed.' >&2
echo 'Install from https://emscripten.org/docs/getting_started/downloads.html'
exit 1
fi

# Compiling for web
emcc salam.c -o salam.js -s ALLOW_MEMORY_GROWTH=1 -s EXIT_RUNTIME=1 -s NO_EXIT_RUNTIME=1

Expand Down

0 comments on commit 131385b

Please sign in to comment.