[GHC] #9370: OPTIONS_GHC (or its absence) leaks between modules compiled in parallel (was: large blowup in memory usage and time when doing parallel build of xmlhtml package)

GHC ghc-devs at haskell.org
Tue Jul 29 22:02:25 UTC 2014


#9370: OPTIONS_GHC (or its absence) leaks between modules compiled in parallel
-------------------------------------+-------------------------------------
              Reporter:  carter      |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Compiler    |          Version:  7.8.3
            Resolution:              |         Keywords:  parmake
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:  Compile-    |       Blocked By:
  time performance bug               |  Related Tickets:  #910 #9221
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Oh, the cause is hiding in plain sight, on the first line of
 `Text.XmlHtml.HTML.Meta`:
 {{{
 {-# OPTIONS_GHC -O0 -fno-case-merge -fno-strictness -fno-cse #-}
 }}}

 If I add the same line to the start of the nine other modules in the
 package, then `Text.XmlHtml.HTML.Meta` compiles as quickly with `-j4` as
 with `-j1`. So somehow flags set by `OPTIONS_GHC` pragmas (or in this
 case, their absence) are leaking between different modules being built in
 parallel.

 These are all dynamic flags at least, right?

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


More information about the ghc-tickets mailing list