Commit 290b32fc authored by lspitzner's avatar lspitzner Committed by quasicomputational

Add check for "ghc-options: -j"

parent 74a9b651
......@@ -1709,6 +1709,12 @@ checkDevelopmentOnlyFlagsBuildInfo bi =
++ "add new warnings. "
++ extraExplanation
, check (has_J) $
PackageDistInexcusable $
"'ghc-options: -j[N]' can make sense for specific user's setup,"
++ " but it is not appropriate for a distributed package."
++ extraExplanation
, checkFlags ["-fdefer-type-errors"] $
PackageDistInexcusable $
"'ghc-options: -fdefer-type-errors' is fine during development but "
......@@ -1746,6 +1752,13 @@ checkDevelopmentOnlyFlagsBuildInfo bi =
has_Werror = "-Werror" `elem` ghc_options
has_Wall = "-Wall" `elem` ghc_options
has_W = "-W" `elem` ghc_options
has_J = any
(\o -> case o of
"-j" -> True
('-' : 'j' : d : _) -> isDigit d
_ -> False
)
ghc_options
ghc_options = hcOptions GHC bi ++ hcProfOptions GHC bi
++ hcSharedOptions GHC bi
......
Markdown is supported
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