Skip to content

Commit 8330018

Browse files
committed
Document how to compile entirely with homebrew packages
1 parent 7b123f3 commit 8330018

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

sqlite3/README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -200,23 +200,17 @@ cmake -S assets/wasm -B .dart_tool/sqlite3_build
200200

201201
##### macOS
202202

203-
On macOS, I'm installing `cmake`, `llvm` and `binaryen` through Homebrew. Afterwards, you can download the
204-
wasi sysroot and the compiler runtimes from the Wasi SDK project:
203+
On macOS, install a WebAssembly-capable C compiler. If you're using Homebrew,
204+
you can use
205205

206206
```
207-
curl -sL https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/libclang_rt.builtins-wasm32-wasi-22.0.tar.gz | \
208-
tar x -zf - -C /opt/homebrew/opt/llvm/lib/clang/18*
209-
210-
curl -sS -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-22/wasi-sysroot-22.0.tar.gz | \
211-
sudo tar x -zf - -C /opt
207+
brew install cmake llvm binaryen wasi-libc wasi-runtimes
212208
```
213209

214-
Replace `clang/18` with the correct directory if you're using a different version.
215-
216210
Then, set up the build with
217211

218212
```
219-
cmake -Dwasi_sysroot=/opt/wasi-sysroot -Dclang=/opt/homebrew/opt/llvm/bin/clang -S assets/wasm -B .dart_tool/sqlite3_build
213+
cmake -Dwasi_sysroot=/opt/homebrew/share/wasi-sysroot -Dclang=/opt/homebrew/opt/llvm/bin/clang -S assets/wasm -B .dart_tool/sqlite3_build
220214
```
221215

222216
#### Building

0 commit comments

Comments
 (0)