diff options
author | Cheng Shao <astrohavoc@gmail.com> | 2022-11-07 08:38:36 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-11 00:26:55 -0500 |
commit | f5dfd1b48f82d08d7346a1988ec08ec3544c940c (patch) | |
tree | 8ae365aa3e4aa5f854d0b80ce57dda9147712b1a /hadrian | |
parent | 2829fd9257abc1b78ebd27692de96fb74c6afcfa (diff) | |
download | haskell-f5dfd1b48f82d08d7346a1988ec08ec3544c940c.tar.gz |
hadrian: add -Wwarn only for cross-compiling unix
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Flavour.hs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs index 88ce819147..b13cb2f365 100644 --- a/hadrian/src/Flavour.hs +++ b/hadrian/src/Flavour.hs @@ -113,7 +113,17 @@ addArgs args' fl = fl { args = args fl <> args' } -- in unix and/or hsc2hs to make cross-compiling unix completely free -- from warnings. werror :: Flavour -> Flavour -werror = addArgs (builder Ghc ? notStage0 ? mconcat [arg "-Werror", flag CrossCompiling ? mconcat [arg "-Wwarn=unused-imports", arg "-Wwarn=unused-top-binds"]]) +werror = + addArgs + ( builder Ghc + ? notStage0 + ? mconcat + [ arg "-Werror", + flag CrossCompiling + ? package unix + ? mconcat [arg "-Wwarn=unused-imports", arg "-Wwarn=unused-top-binds"] + ] + ) -- | Build C and Haskell objects with debugging information. enableDebugInfo :: Flavour -> Flavour |