Commit ac57778
build: vendor SQLite amalgamation + resolve macOS SDK paths (true static binary)
Two changes that make the binary genuinely self-contained and fix Intel-Mac
cross-compilation:
- Vendor the SQLite amalgamation (lib/sqlite3.c/.h + sqlite3ext.h) and compile
it in, instead of linkSystemLibrary("sqlite3"). The binary no longer has a
dynamic libsqlite3 dependency (verified via otool) — closing the gap in the
"single static binary, zero deps" claim — and cross-compiles without a
target-arch system-library lookup.
- build.zig: resolve the macOS SDK path via xcrun and add its framework/lib
search paths, so cross-compiling x86_64 on an arm host can find Accelerate /
Metal / Foundation (native builds auto-detect these; cross builds don't).
Verified: native arm64 build + 14/14 integration tests pass; x86_64 cross-build
produces a working, fully self-contained binary (runs under Rosetta).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0698d53 commit ac57778
4 files changed
Lines changed: 284484 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| |||
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
80 | 93 | | |
81 | 94 | | |
82 | 95 | | |
| |||
87 | 100 | | |
88 | 101 | | |
89 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
0 commit comments