Skip to content

Commit 1998470

Browse files
committed
Statically link Windows binary to fix missing DLL error
Add -extldflags '-static' to Windows build so libwinpthread-1.dll and other MinGW runtime DLLs are embedded in the binary.
1 parent 5cbeca3 commit 1998470

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
# Strip leading 'v' — version var should be bare semver (e.g. 0.4.0)
117117
CLEAN_VERSION="${VERSION#v}"
118118
CGO_ENABLED=1 CC=gcc go build \
119-
-ldflags "-X main.version=$CLEAN_VERSION" \
119+
-ldflags "-X main.version=$CLEAN_VERSION -extldflags '-static'" \
120120
-o codebase-memory-mcp.exe \
121121
./cmd/codebase-memory-mcp/
122122

0 commit comments

Comments
 (0)