Skip to content

Commit c467c0a

Browse files
wesmclaude
andcommitted
Fix Windows build: use lld linker instead of MinGW ld
MinGW's ld runs out of memory (exit code 5) linking DuckDB's large static library. Switch to LLVM's lld which handles large binaries efficiently. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3451ce2 commit c467c0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ jobs:
154154
uses: msys2/setup-msys2@4f806de0a5a7294ffabaff804b38a9b435a73bda # v2.30.0
155155
with:
156156
msystem: MINGW64
157-
install: mingw-w64-x86_64-gcc
157+
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-lld
158158

159159
- name: Build
160160
shell: pwsh
@@ -167,7 +167,7 @@ jobs:
167167
$VERSION = "${{ github.ref_name }}".TrimStart("v")
168168
169169
New-Item -ItemType Directory -Force -Path dist | Out-Null
170-
$LDFLAGS = "-s -w -X github.com/wesm/msgvault/cmd/msgvault/cmd.Version=v${VERSION} -extldflags '-Wl,--no-keep-memory'"
170+
$LDFLAGS = "-s -w -X github.com/wesm/msgvault/cmd/msgvault/cmd.Version=v${VERSION} -extldflags '-fuse-ld=lld'"
171171
go build -tags fts5 -trimpath -ldflags="$LDFLAGS" -o dist/msgvault.exe ./cmd/msgvault
172172
if ($LASTEXITCODE -ne 0) { throw "Build failed" }
173173

0 commit comments

Comments
 (0)