Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/actions/verify-windows-gui-dlls/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Verify Windows GUI DLL dependencies
description: Fails if the built Windows GUI exe imports MinGW runtime DLLs (libgcc_s_seh-1.dll, libstdc++-6.dll, libwinpthread-1.dll).
inputs:
exe-glob:
description: Glob for the built GUI exe
required: false
default: build/bin/*.exe
runs:
using: composite
steps:
- name: Check PE imports for forbidden MinGW runtime DLLs
shell: msys2 {0}
run: |
set -euo pipefail
exe=$(ls ${{ inputs.exe-glob }} | head -n1)
if [ -z "$exe" ]; then
echo "::error::No exe found matching glob '${{ inputs.exe-glob }}'"
exit 1
fi
echo "Inspecting: $exe"
imports=$(objdump -p "$exe" | grep -i "DLL Name:" || true)
echo "--- DLL imports ---"
echo "$imports"
echo "-------------------"
forbidden='libgcc_s_seh-1\.dll|libstdc\+\+-6\.dll|libwinpthread-1\.dll'
if echo "$imports" | grep -iE "$forbidden"; then
echo "::error::Windows GUI exe depends on MinGW runtime DLL(s); static linking regressed."
exit 1
fi
echo "OK: no MinGW runtime DLL dependencies found."
3 changes: 3 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ jobs:
CC: gcc
CGO_LDFLAGS: '-static-libgcc -static-libstdc++ -Wl,-Bstatic -lpthread -Wl,-Bdynamic'

- name: Verify no MinGW runtime DLL dependencies
uses: ./.github/actions/verify-windows-gui-dlls

- name: Upload Windows GUI artifact
uses: actions/upload-artifact@v4
with:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ jobs:
CC: gcc
CGO_LDFLAGS: '-static-libgcc -static-libstdc++ -Wl,-Bstatic -lpthread -Wl,-Bdynamic'

# Verify the built exe doesn't dynamically depend on MinGW runtime DLLs
- name: Verify no MinGW runtime DLL dependencies
uses: ./.github/actions/verify-windows-gui-dlls

# Upload Windows artifact
- name: Upload Windows GUI artifact
uses: actions/upload-artifact@v4
Expand Down
Loading