Commit 0983168a authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Merge pull request #3161 from 23Skidoo/check-ghc-prof-options

D.PD.Check: Also check 'ghc-shared-options'.
parents dc004d08 b89055bc
......@@ -675,6 +675,7 @@ checkGhcOptions pkg =
all_ghc_options = concatMap get_ghc_options (allBuildInfo pkg)
lib_ghc_options = maybe [] (get_ghc_options . libBuildInfo) (library pkg)
get_ghc_options bi = hcOptions GHC bi ++ hcProfOptions GHC bi
++ hcSharedOptions GHC bi
checkFlags :: [String] -> PackageCheck -> Maybe PackageCheck
checkFlags flags = check (any (`elem` flags) all_ghc_options)
......@@ -1363,6 +1364,7 @@ checkDevelopmentOnlyFlagsBuildInfo bi =
has_Wall = "-Wall" `elem` ghc_options
has_W = "-W" `elem` ghc_options
ghc_options = hcOptions GHC bi ++ hcProfOptions GHC bi
++ hcSharedOptions GHC bi
checkFlags :: [String] -> PackageCheck -> Maybe PackageCheck
checkFlags flags = check (any (`elem` flags) ghc_options)
......
......@@ -1370,7 +1370,7 @@ values for these fields.
enabled.
Note that as of Cabal-1.24, the default profiling detail level defaults to
`exported-functions` for libraries and `toplevel-funcitons` for
`exported-functions` for libraries and `toplevel-functions` for
executables. For GHC these correspond to the flags `-fprof-auto-exported`
and `-fprof-auto-top`. Prior to Cabal-1.24 the level defaulted to `none`.
These levels can be adjusted by the person building the package with the
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment