#437: Recompilation check should include flags
-----------------------+----------------------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: low | Milestone: 7.2.1
Component: Compiler | Version: 6.4.1
Resolution: None | Keywords:
Testcase: mod175 | Blockedby:
Difficulty: Unknown | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: Other |
-----------------------+----------------------------------------------------
Comment(by simonmar):
Replying to [comment:16 dterei]:
> I was thinking, the easiest way to fix this would be to store a new
fingerprint in the interface file for a module that is a hash of the flags
that if changed should trigger recompilation. So '-main-is', probably '-O'
should be part of the hash but '-Wall' shouldn't for example. If this
sounds like a reasonable plan then I would be happy to code it up since it
would be useful somewhat to the SafeHaskell work. Recompilation of a
module on this condition I don't think should trigger recompilation of
modules depending on it though.
Sounds good. You would need to be careful to normalise the flags (sort
them), and as you say filter out any flags that shouldn't trigger
recompilation. It's not clear to me that changing optimisation settings
should trigger recompilation: for example, you might have a large program
compiled unoptimised, and then decide that you want to optimise just one
or two modules, so you remove a few `.o` files, add `-O` and recompile.
Rather than using the text of the flags themselves, you might want to
serialise the internal representation, as we do for the linker flags (see
`DriverPipeline.getLinkInfo`).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/437#comment:18>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs