diff --git a/src/wasi-libc b/src/wasi-libc index 018057e..7b92f33 160000 --- a/src/wasi-libc +++ b/src/wasi-libc @@ -1 +1 @@ -Subproject commit 018057e043b82031e44a273790098eb8d3121619 +Subproject commit 7b92f334e69c60a1d1c5d3e289790d790b9a185b diff --git a/strip_symbols.sh b/strip_symbols.sh index b853501..c161f60 100755 --- a/strip_symbols.sh +++ b/strip_symbols.sh @@ -1,8 +1,14 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash set -e DIRECTORY=${1:-/opt/wasi-sdk/bin} +if [[ "$OSTYPE" == "darwin"* ]]; then +# macos find doesnt support -executable so we fall back on having a permission +# bit to execute: +EXECUTABLES=$(find ${DIRECTORY} -type f -perm +111) +else EXECUTABLES=$(find ${DIRECTORY} -type f -executable) +fi for e in ${EXECUTABLES}; do echo "Stripping symbols: ${e}" strip ${e} || echo "Failed to strip symbols for ${e}; continuing on."