generate-emscripten-symbols.sh: allows the lib path to be overridden

This commit is contained in:
Frank Denis 2022-12-09 21:10:58 +01:00
parent b706a78d38
commit 991b56c739

View File

@ -2,6 +2,8 @@
set -e set -e
LIBSODIUM=${LIBSODIUM:-/tmp/sodium/lib/libsodium.27.dylib}
symbols() { symbols() {
{ {
SUMO="$1" SUMO="$1"
@ -17,9 +19,9 @@ symbols() {
fi fi
done < emscripten-symbols.def done < emscripten-symbols.def
/usr/bin/nm /usr/local/lib/libsodium.23.dylib | \ /usr/bin/nm "$LIBSODIUM" |
fgrep ' T _' | \ fgrep ' T _' |
cut -d' ' -f3 | { cut -d' ' -f3 | {
while read symbol; do while read symbol; do
eval "found=\$defined_${symbol}" eval "found=\$defined_${symbol}"
if [ "$found" = "yes" ]; then if [ "$found" = "yes" ]; then