On Windows, we're constrained to 32k bytes total for command line arguments.
When building large projects, this limit can be exceeded. This patch changes
GHC to always use response files for linker arguments, a feature first used by
Microsoft compilers and added to GCC (over a decade ago).
Alternatives here include:
- Only use this method on Windows systems
- Check the length of the command line arguments and use that to decide whether to use this method
I did not pursue either of these, as I believe it would make the patch more
likely to break in less tested situations.