Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building on Windows with MSYS2 #192

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

500-internal-server-error
Copy link

@500-internal-server-error 500-internal-server-error commented Feb 19, 2025

This PR:

  • fixes building on Windows with MSYS2 UCRT64 GCC (adds -mbig-obj to CXXFLAGS by default for MinGW in general, instead of just Cygwin)
  • fixes building on Windows with MSYS2 CLANG64 Clang (modifies the #ifdefss around the GCC #pragmas to also work for Clang, and adds more to fix the things Clang catches that GCC doesn't)
  • adds MSYS2 to CI

Tests against std::filesystem remain broken, and must be disabled using -DGHC_FILESYSTEM_BUILD_STD_TEST=NO, but at least -DCMAKE_CXX_FLAGS=-Wa,-mbig-obj is no longer required to be passed explicitly.

If any of the above are undesirable, it can be reverted and/or added in a separate PR.

Fixes #189

Apply GCC `#pragma`s to Clang too, and also more to fix the things Clang
catches that GCC doesn't
It's already being done for Cygwin, presumably for the same reasons.
Clang auto-applies `-mbig-obj` as needed it seems:
https://reviews.llvm.org/D102419

Tests against `std::filesystem` remain broken, though, and building
with MinGW still requires disabling them manually with
`-DGHC_FILESYSTEM_BUILD_STD_TESTING=NO`:
gulrak#189 (comment)
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.

Doesn't build on Windows MSYS2 MinGW/Clang
1 participant