Skip to content

Add MinGW/MSYS2 build support and CI#491

Closed
robtaylor wants to merge 2 commits intoberkeley-abc:masterfrom
robtaylor:mingw-makefile-fixes
Closed

Add MinGW/MSYS2 build support and CI#491
robtaylor wants to merge 2 commits intoberkeley-abc:masterfrom
robtaylor:mingw-makefile-fixes

Conversation

@robtaylor
Copy link
Copy Markdown

This PR builds on #435 (thanks @cr1901!) — the Makefile changes are rebased onto current master and the _MSC_VER guards upstream already landed separately. Two additional fixes/additions:

  • Fix LIBS += -lshlwapi: Add Windows fixes so abc compiles natively with GCC. #435 used = (assignment) which would have overwritten all previously accumulated libs; changed to +=
  • Add build-mingw.yml CI workflow: uses MSYS2/MINGW64 on windows-latest to actually verify the MinGW build path in CI

Changes

Commit 1 — Makefile changes from #435:

  • Normalize MINGW% uname output to OS := MINGW for clean conditionals
  • Exclude -lrt and -ldl on MINGW (these don't exist on Windows)
  • Add -lshlwapi for PathMatchSpecA used in sclLiberty.c
  • Response file linker rule to work around 32KB command-line limit on MinGW
  • Add $(PROG).in to GARBAGE for cleanup

Commit 2 — CI:

  • New build-mingw.yml: MSYS2/MINGW64, windows-latest, ABC_USE_STDINT_H=1, -DWIN32 -DWIN32_NO_DLL

Note: the WIN32_MSC_VER changes from #435 were not included — upstream already landed equivalent defined(WIN32) && !defined(__MINGW32__) guards in cadical/kissat, which achieve the same result.

Closes #435

cr1901 and others added 2 commits April 3, 2026 00:02
Add a new build-mingw.yml workflow that builds ABC using MinGW64/MSYS2
on windows-latest. This provides CI coverage for the MinGW build path
added in the previous commit, using ABC_USE_STDINT_H=1 and
-DWIN32 -DWIN32_NO_DLL to handle MinGW platform quirks.

Co-developed-by: Claude Code v2.1.90 (claude-sonnet-4-6)
@robtaylor
Copy link
Copy Markdown
Author

Closing for now — testing CI on fork first before submitting upstream.

@robtaylor robtaylor closed this Apr 2, 2026
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.

2 participants