Skip to content

Commit fb92cd4

Browse files
committed
--coverage enables -fhpc despite apply-ghc-options
1 parent d38f5ae commit fb92cd4

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/Stack/Options.hs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,10 @@ benchOptsParser = BenchmarkOpts
7474
<*> switch (long "no-run-benchmarks" <>
7575
help "Disable running of benchmarks. (Benchmarks will still be built.)")
7676

77-
addCoverageFlags :: BuildOpts -> BuildOpts
78-
addCoverageFlags bopts
79-
| toCoverage $ boptsTestOpts bopts
80-
= bopts { boptsGhcOptions = "-fhpc" : boptsGhcOptions bopts }
81-
| otherwise = bopts
82-
8377
-- | Parser for build arguments.
8478
buildOptsParser :: Command
8579
-> Parser BuildOpts
8680
buildOptsParser cmd =
87-
fmap addCoverageFlags $
8881
BuildOpts <$> target <*> libProfiling <*> exeProfiling <*>
8982
haddock <*> haddockDeps <*> dryRun <*> ghcOpts <*>
9083
flags <*> copyBins <*> preFetch <*> buildSubset <*>

src/Stack/Types/Build.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ configureOptsNoDir econfig bco deps wanted isLocal package = concat
727727
allGhcOptions = concat
728728
[ Map.findWithDefault [] Nothing (configGhcOptions config)
729729
, Map.findWithDefault [] (Just $ packageName package) (configGhcOptions config)
730+
, concat [["-fhpc", "-fforce-recomp"] | isLocal && toCoverage (boptsTestOpts bopts)]
730731
, if includeExtraOptions
731732
then boptsGhcOptions bopts
732733
else []

0 commit comments

Comments
 (0)