From b6f0bf2df0f6baadc345a9d146599197a5b46e9f Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 16 Oct 2026 09:19:30 +0000 Subject: fix(build): statically link MinGW XML manifest dependencies Replace LLVMWindowsManifest's XML import library with static XML, iconv and zlib archives. Check the Windows compiler's PE imports before the restricted-PATH package smoke test. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/nightly-build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/nightly-build.yml b/.github/workflows/nightly-build.yml index 773f8ca..62b8d49 100644 --- a/.github/workflows/nightly-build.yml +++ b/.github/workflows/nightly-build.yml @@ -217,6 +217,7 @@ jobs: mingw-w64-x86_64-python mingw-w64-x86_64-libffi mingw-w64-x86_64-libxml2 + mingw-w64-x86_64-libiconv mingw-w64-x86_64-zlib mingw-w64-x86_64-zstd @@ -239,6 +240,26 @@ jobs: -DCMAKE_PREFIX_PATH="$(cygpath -m /mingw64)" cmake --build build --target release --parallel 4 + - name: Check Windows runtime dependencies + shell: msys2 {0} + run: | + llvm-readobj --coff-imports build/cpsc.exe > build/windows-imports.txt + imports=$(sed -n 's/^ Name: //p' build/windows-imports.txt | tr -d '\r') + test -n "$imports" + windows_root=$(cygpath -u "$SYSTEMROOT") + while IFS= read -r library; do + echo "Runtime dependency: $library" + case "${library,,}" in + api-ms-win-*.dll|ext-ms-win-*.dll) ;; + *) + if [[ ! -f "$windows_root/System32/$library" ]]; then + echo "Unexpected runtime dependency: $library" >&2 + exit 1 + fi + ;; + esac + done <<< "$imports" + - name: Smoke test the packaged compiler shell: pwsh run: | -- cgit v1.3.1-4-g156e