Skip to content

fix: statically link MinGW runtime in Windows CLI builds#199

Merged
javi11 merged 1 commit intomainfrom
fix/windows-cli-static-linking
Apr 11, 2026
Merged

fix: statically link MinGW runtime in Windows CLI builds#199
javi11 merged 1 commit intomainfrom
fix/windows-cli-static-linking

Conversation

@javi11
Copy link
Copy Markdown
Owner

@javi11 javi11 commented Apr 11, 2026

Summary

  • Add -linkmode external -extldflags '-static' to Go linker flags for Windows CLI builds in both release.yml and dev-build.yml
  • Eliminates the need to ship MinGW DLLs (libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll) alongside the .exe
  • Aligns CLI builds with the GUI and web builds which already had these flags

Related #198

Windows CLI builds were missing `-linkmode external -extldflags '-static'`
in the Go linker flags, causing the resulting binary to depend on external
MinGW DLLs (libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll).

The GUI and web builds already had these flags. This aligns the CLI builds
so the .exe is fully self-contained with no runtime DLL dependencies.
@javi11 javi11 merged commit 71d9686 into main Apr 11, 2026
3 checks passed
@javi11 javi11 deleted the fix/windows-cli-static-linking branch April 11, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant