Using stack, how to get builds both for 32 bit and 64 bit Windows?

Viewed 156

Despite being new to Haskell and everything, thanks to the nice documentation and tutorials, I was able to install Haskell using Stack on my Windows 64 bit system. I can build the tutorial examples and all works fine. But: I also need 32 bit executables as build result, as the software must run on 32 bit Windows IoT too.

How do I setup cross-compiling to 32 bit Windows? Automatically generating both the 32 bit and the 64 bit executables would be most comfortable, but not required.

1 Answers

I fear you're going to have a bit of a slog ahead. Official GHC releases don't have 32-bit binaries any more, and I don't believe they've ever featured cross-compiler binaries. I think you'll have to build GHC yourself, either natively for 32-bit Windows (and run on a 32-bit Windows or some sort of compatibility mode if that exists) or for cross-compiling. Here are some starting points that may help:

Related