Open
Description
Describe the bug
ghc-prof-options
in <package>.cabal
does not take into account newer changes. Possibly related to #3891
To Reproduce
Suppose my package file is large.cabal
with ghc-prof-options: -fno-prof-count-entries
:
executable large
main-is: Main.hs
build-depends:
base ^>=4.17.2.0,
hs-source-dirs: app
default-language: Haskell2010
ghc-prof-options: -fno-prof-count-entries
- Run this using:
cabal run --enable-profiling large -- +RTS -p
- Note that the
large.prof
file will have allentries
set to 0 - Change ghc-prof-options above to
ghc-prof-options: -fprof-count-entries
to force counting entries - Run again using same command. Output (notice it doesn't recompile!):
Resolving dependencies...
Build profile: -w ghc-9.4.7 -O1
In order, the following will be built (use -v for more details):
- large-0.1.0.0 (exe:large) --enable-profiling (configuration changed)
Configuring executable 'large' for large-0.1.0.0..
Preprocessing executable 'large' for large-0.1.0.0..
Building executable 'large' for large-0.1.0.0..
- Note that the
large.prof
file will still have allentries
set to 0. Not Expected - Run
cabal clean
- Run again using same command and note non-zero entries in
large.prof
.
Expected behavior
Code should be recompiled with up-to-date ghc-prof-options