From 18c415948a91472d626c0b8e8fa9225ee45dcfb8 Mon Sep 17 00:00:00 2001 From: Etienne ANNE Date: Tue, 23 Jul 2024 14:58:43 +0200 Subject: [PATCH] fix binaryen library binding --- install.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e7ba9d1..cc2a920 100644 --- a/install.sh +++ b/install.sh @@ -49,8 +49,16 @@ if ! which "wasm-merge" > /dev/null; then mv binaryen/bin/wasm-opt /usr/local/binaryen/wasm-opt ln -s /usr/local/binaryen/wasm-opt /usr/local/bin/wasm-opt - mv binaryen/lib/libbinaryen.dylib /usr/local/binaryen/libbinaryen.dylib - ln -s /usr/local/binaryen/libbinaryen.dylib /usr/local/lib/libbinaryen.dylib + if [ $OS = "linux" ]; then + mv binaryen/lib/libbinaryen.a /usr/local/binaryen/libbinaryen.a + ln -s /usr/local/binaryen/libbinaryen.a /usr/local/lib/libbinaryen.a + fi + + if [ $OS = "macos" ]; then + mv binaryen/lib/libbinaryen.dylib /usr/local/binaryen/libbinaryen.dylib + ln -s /usr/local/binaryen/libbinaryen.dylib /usr/local/lib/libbinaryen.dylib + fi + else echo "wasm-merge already installed" fi