[GHC] #13604: ghci no longer loads dynamic .o files by default if they were built with -O

GHC ghc-devs at haskell.org
Sun Oct 29 20:15:46 UTC 2017


#13604: ghci no longer loads dynamic .o files by default if they were built with -O
-------------------------------------+-------------------------------------
        Reporter:  George            |                Owner:  dfeuer
            Type:  bug               |               Status:  patch
        Priority:  highest           |            Milestone:  8.2.2
       Component:  Compiler          |              Version:  8.2.1-rc1
      Resolution:                    |             Keywords:
                                     |  RecompilationCheck
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Runtime           |  Unknown/Multiple
  performance bug                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D4123
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 elaforge, I have an idea that feels like it provides a reasonably
 consistent UI, but I'd like to see what you think.

 1. Optimization flags (including `-O0`) imply `-fobject-code`. This
 ensures that GHC respects optimization flags regardless of
 `--interactive`.

 2. Even when `-fobject-code` is on, `:load *M` will load `M` as bytecode.
 This provides the "escape hatch" from `-fobject-code` that you need to use
 debugging features, etc.

 3. We add `-fignore-optim-changes` and `-fignore-hpc-changes`
 (​Phab:D4123), enabling users to put together object code and bytecode
 with diverse optimization levels and HPC info while still updating
 automatically based on source changes and whether profiling is enabled.

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


More information about the ghc-tickets mailing list