diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2cbd7d5..057c20c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,6 +104,7 @@ jobs: mingw-w64-x86_64-gcc mingw-w64-x86_64-lz4 mingw-w64-x86_64-zlib + mingw-w64-x86_64-ntldd - name: Cache Chez Scheme (Windows) if: runner.os == 'Windows' @@ -154,6 +155,15 @@ jobs: - name: Build joltc (release) run: make joltc-release + - name: Inspect the binary (Windows) + if: runner.os == 'Windows' + run: | + set +e + ls -la target/release/ + ntldd target/release/joltc.exe 2>&1 | head -20 + ./target/release/joltc.exe -e '(+ 1 2)' + echo "exit=$?" + # Sanity: the built binary runs (no Chez needed) and self-reports a value. - name: Smoke the binary run: | diff --git a/host/chez/build.ss b/host/chez/build.ss index abe0312..1fb4812 100644 --- a/host/chez/build.ss +++ b/host/chez/build.ss @@ -121,7 +121,9 @@ ;; Windows (ta6nt, MinGW-w64 under MSYS2): the Chez kernel pulls in ;; compression, winsock, COM/UUID, and the registry. (bld-nt? - "-llz4 -lz -lws2_32 -lrpcrt4 -lole32 -luuid -ladvapi32 -luser32 -lshell32 -lm") + ;; -static: a single-file exe (no libwinpthread/libgcc/lz4 DLL deps) — + ;; required for a distributable binary and for TLS init consistency. + "-static -llz4 -lz -lws2_32 -lrpcrt4 -lole32 -luuid -ladvapi32 -luser32 -lshell32 -lm") ;; Linux: the Chez kernel pulls in compression (lz4/z), the expression ;; editor (ncurses + terminfo), threads, dlopen, libuuid, and clock_gettime. (else "-llz4 -lz -lncurses -ltinfo -ldl -lm -lpthread -luuid -lrt")))