[GHC] #11798: Explicit recompilation required to change compilation options (was: Recompiling with -fhpc flag added does nothing)
GHC
ghc-devs at haskell.org
Sun Mar 19 06:00:34 UTC 2017
#11798: Explicit recompilation required to change compilation options
-------------------------------------+-------------------------------------
Reporter: drathier | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: 8.4.1
Component: Compiler | Version: 7.10.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by dfeuer):
* type: bug => feature request
* architecture: x86_64 (amd64) => Unknown/Multiple
* milestone: => 8.4.1
Old description:
> When you recompile without modifiying any source code, nothing happens,
> as expected. The file is already compiled, after all. If you then add the
> -fhpc flag, it still doesn't recompile, even though it now should
> generate .tix files. These files are now unexpectedly missing, until the
> source files are modified or the .o and .hi files are deleted, and the
> code is recompiled again with the -fhpc flag.
>
> reproduce:
> 1. compile program
> 2. compile program with -fhpc
> note: missing .tix file
> 3. delete .hi and .o files
> 4. compile program with -fhpc
> 5. success; .tix file is generated
New description:
When you recompile without modifying any source code, nothing happens, as
expected. The file is already compiled, after all. If you then change
compilation options, such as adding the `-fhpc` or `-O2` flag, it still
doesn't recompile, even though the program might now be expected to behave
or perform differently. Users can work around this using `-fforce-recomp`,
but perhaps they shouldn't have to, or perhaps they should be warned that
this may be necessary. One option might be to record "significant"
compilation options in the `.hi` file, to determine whether they have
changed in a way that suggests recompilation may be in order.
--
Comment:
The original ticket claimed this was a bug recompiling with `-fhpc`, but
in fact this is the way GHC behaves with compilation option changes in
general. I've taken the liberty of modifying the title and description and
making this a feature request, because I think there's a reasonable
feature request here.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11798#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list