GHC silently turns off dynamic output, should this be an error?
igloo at earth.li
Tue Jun 24 20:36:09 UTC 2014
On Mon, Jun 23, 2014 at 12:58:16PM -0500, Christopher Rodrigues wrote:
> Additionally, is it ever valid to have a pair of .hi and .dyn_hi files with
> different interface hashes?
You can, for example, compile package foo the vanilla way with -O, and
the dynamic way without -O. You'll then get mismatched hashes.
If you then try to compile bar (which depends on foo) with -dynamic-too
then the idea was that it would transparently fall back to compiling the
two ways separately. Otherwise every build system (Cabal, make rules,
etc) that wants to use -dynamic-too would have to handle this failure
and either fail or fall back itself.
More information about the ghc-devs