[GHC] #10777: Overlong linker arguments on Windows leads to broken builds with confusing error messages

GHC ghc-devs at haskell.org
Wed Sep 2 11:49:20 UTC 2015


#10777: Overlong linker arguments on Windows leads to broken builds with confusing
error messages
-------------------------------------+-------------------------------------
        Reporter:  snoyberg          |                   Owner:  snoyberg
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.2
      Resolution:                    |                Keywords:
Operating System:  Windows           |            Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash                              |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #8596 #9685       |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by Ben Gamari <ben@…>):

 In [changeset:"296bc70b5ff6c853f2782e9ec5aa47a52110345e/ghc" 296bc70/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="296bc70b5ff6c853f2782e9ec5aa47a52110345e"
 Use a response file for linker command line arguments #10777

 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.

 Test Plan:
 Confirm that linking still works in general. Ideally: compile a very
 large project on Windows with this patch. (I am attempting to do that
 myself now, but having trouble getting the Windows build tool chain up
 and running.)

 Reviewers: goldfire, hvr, rwbarton, austin, thomie, bgamari, Phyx

 Reviewed By: thomie, bgamari, Phyx

 Subscribers: erikd, awson, #ghc_windows_task_force, thomie

 Differential Revision: https://phabricator.haskell.org/D1158

 GHC Trac Issues: #8596, #10777
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10777#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list