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

GHC ghc-devs at haskell.org
Mon Aug 17 10:20:37 UTC 2015


#10777: Overlong linker arguments on Windows leads to broken builds with confusing
error messages
-------------------------------------+-------------------------------------
        Reporter:  snoyberg          |                   Owner:
            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:                    |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by awson):

 I have a patch for `Cabal` which introduces response files usage for `ar`
 and `ld`. This speeds things up dramatically in some cases and eliminates
 some problems with prelinked object files creation when `split-objs` and
 gcc > 4.8 are used.

 This technique can clearly be applied to `gcc` invocations also because
 `gcc` on windows also supports response files (for ages).

 The problem with this patch is that:
 1. I am lazy, and since I use this patch only internally I didn't bother
 to factor common code out and simply almost copypasted (added a very minor
 edit) the same code both for `ar` and `ld`.
 2. I didn't test anything on the platforms other than `windows` -- perhaps
 something could be broken there. OTOH, the patch is very simple and could
 easily be polished to play nicely with a platform specificity.
 2. It deals with `Cabal`, not with `ghc`. I didn't read linked content
 thoroughly, do we need to modify `ghc`, or modifying `Cabal` would
 suffice? Btw, feature request for adding it to `ghc`
 [https://ghc.haskell.org/trac/ghc/ticket/8596 exists].

 Anyway, if anybody is interested to look at how this works I can attach
 the patch.

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


More information about the ghc-tickets mailing list