Skip to content

Commit

Permalink
Enable 'make setup' to run on MacOS/Arm
Browse files Browse the repository at this point in the history
Upgrade to the latest WASI SDK (version 21) that provides universal
binaries for MacOS. This enables `make setup` to succeed on MacOS with
x86 was well as Arm hardware.
  • Loading branch information
rherrmann authored and dyedgreen committed Jan 7, 2024
1 parent 92baab6 commit 8f9505d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions build/.checksums
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
bf6d27027087b3f3ff7dfc305aff4cee28a72e6e sqlite_dl.zip
022ae45d50b124b9df68be065d65b9a607923362 wasi_dl_linux.tar.gz
bc76d264214c21a603fc38adb405622a2fcda8b3 wasi_dl_darwin.tar.gz
4a4c59dd369651fed34dcaa8b0c3f319bf02c8a8 wasi_dl_linux.tar.gz
69fe720d453d0ded2e63c68eea344e7e547b2ba4 wasi_dl_darwin.tar.gz
6 changes: 3 additions & 3 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ OUT_TY = "sqlite.d.ts"
SQLITE_DLD = "https://sqlite.org/2023/sqlite-src-3420000.zip"
SQLITE_DIR = "sqlite-src-3420000"

WASI_DLD = "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/wasi-sdk-16.0-linux.tar.gz"
WASI_DLD = "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sdk-21.0-linux.tar.gz"
WASI_TAR = wasi_dl_linux.tar.gz
ifeq ($(shell uname), Darwin)
WASI_DLD = "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/wasi-sdk-16.0-macos.tar.gz"
WASI_DLD = "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-21/wasi-sdk-21.0-macos.tar.gz"
WASI_TAR = wasi_dl_darwin.tar.gz
endif

Expand Down Expand Up @@ -122,7 +122,7 @@ dlwasi:
sed -n '/${WASI_TAR}/p' ".checksums" | shasum -c -
rm -rf "wasi-sdk"
tar -xzvf "$(WASI_TAR)"
mv "wasi-sdk-16.0" "wasi-sdk"
mv "wasi-sdk-21.0" "wasi-sdk"
rm "${WASI_TAR}"

testdb:
Expand Down

0 comments on commit 8f9505d

Please sign in to comment.