Windows without MinGW
This is a long term, pie-in-the-sky goal, but it would be nice to build binaries without MinGW / MSYS. LLVM's Windows support is now superior, especially when C++ is involved, so it would be nice to use it. After that I might even aim for MSVC support (You can try things the flags with clang-cl
.)
Beyond Windows itself, it's good to rid an assumption of Unixy assumptions. One small example example having to output with GCC- and MSVC- style flags forces better abstractions that are probably a good idea anyways. More broadly, this also helps if we are every to run GHC on exotic platforms like Fuschia or some WASM thing or HalVM or whatever.
I have a few ideas on how this might work. The first step is just focusing on cross; that is just changing Haskell code. For actually building GHC, we need to just remove Make, sh, and other unix-only tools from the build-time deps. Shake avoids make, of course. As to sh, the main source is configure scripts (I think?). If we do #17191 (closed) we could rewrite the RTS configure to use CMake or Meson. Those both support Ninja, which shake can consume. https://gitlab.freedesktop.org/gstreamer/meson-ports/libffi is also a meson point of libffi. I think that just leaves GMP, but one can use integer-simple
as a stop-gap.