Skip to content

Commit 1b6aea3

Browse files
lklimekclaude
andcommitted
fix(ci): statically link MinGW runtime for Windows builds
Adds -static-libgcc, -static-libstdc++, and static winpthread rustflags for the x86_64-pc-windows-gnu target so the Windows binary no longer depends on MinGW runtime DLLs absent on user machines. Also sets OPENSSL_STATIC=1 on the build step to statically link OpenSSL. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 26be625 commit 1b6aea3

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ rustflags = ["-C", "target-feature=-crt-static", "-C", "target-cpu=x86-64"]
1010
[target.x86_64-pc-windows-gnu]
1111
linker = "x86_64-w64-mingw32-gcc-posix"
1212
ar = "x86_64-w64-mingw32-ar"
13+
rustflags = ["-C", "link-args=-static-libgcc -static-libstdc++ -Wl,-Bstatic -lpthread -Wl,-Bdynamic"]
1314

1415
[env]
1516
CC_x86_64_pc_windows_gnu = "x86_64-w64-mingw32-gcc-posix"

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ jobs:
103103
cargo build --release --target ${{ matrix.target }}
104104
mv target/${{ matrix.target }}/release/dash-evo-tool${{ matrix.ext }} dash-evo-tool/dash-evo-tool${{ matrix.ext }}
105105
if [ -f winlibs/sqlite3.dll ]; then cp winlibs/sqlite3.dll dash-evo-tool/sqlite3.dll; fi
106+
env:
107+
OPENSSL_STATIC: "1"
106108

107109
- name: Package release
108110
run: |

0 commit comments

Comments
 (0)