• Moritz Angermann's avatar
    Fix gcc.exe: error: CreateProcess: No such file or directory · 227ede4a
    Moritz Angermann authored
    When GHC links binaries on windows, we pass a -L and -l flag
    to gcc for each dependency in the transitive dependency
    closure.  As this will usually overflow the command argument
    limit on windows, we use response files to pass all arguments
    to gcc.  gcc however internally passes only the -l flags via
    a response file to the collect2 command, but puts the -L flags
    on the command line. As such if we pass enough -L flags to
    gcc--even via a response file--we will eventually overflow the
    command line argument length limit due to gcc passing them
    to collect2 without resorting to a response file.
    To prevent this from happening we move all lirbaries into a
    shared temporary folder, and only need to pass a single -L
    flag to gcc.  Ideally however this was fixed in gcc.
    Reviewers: bgamari, Phyx
    Reviewed By: bgamari
    Subscribers: erikd, rwbarton, thomie, carter
    Differential Revision: https://phabricator.haskell.org/D4762
Packages.hs 89.6 KB