summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2019-10-24 19:54:30 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-29 03:48:20 -0400
commitd7cedd9d74e51ae9704802af6eb4775a16e59039 (patch)
treeef9a0d9e7b30a7fb7ebecc09cb9afd13e25cd084
parentb741d19dc0380988f4f5663dc72eef4710bb0771 (diff)
downloadhaskell-d7cedd9d74e51ae9704802af6eb4775a16e59039.tar.gz
hadrian: Drop -Werror=unused-but-set-variable from GHC flags
Previously `hadrian` would pass `-optc-Werror=unused-but-set-variable` to all GHC invocations. This was a difference from the make build system and cause the unregisterised build to fail as the C that GHC produces contains many unused functions. Drop it from the GHC flags. Note, however, that the flag is still present in `Settings.Builders.Common.cWarnings` and therefore will still be applied during compilation of C sources.
-rw-r--r--hadrian/src/Settings/Warnings.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/hadrian/src/Settings/Warnings.hs b/hadrian/src/Settings/Warnings.hs
index 0d654411c4..29f9e3b968 100644
--- a/hadrian/src/Settings/Warnings.hs
+++ b/hadrian/src/Settings/Warnings.hs
@@ -11,9 +11,7 @@ import Settings
defaultGhcWarningsArgs :: Args
defaultGhcWarningsArgs = mconcat
[ notStage0 ? arg "-Wnoncanonical-monad-instances"
- , (not <$> flag CcLlvmBackend) ? mconcat
- [ not windowsHost ? arg "-optc-Werror=unused-but-set-variable"
- , arg "-optc-Wno-error=inline" ]
+ , notM (flag CcLlvmBackend) ? arg "-optc-Wno-error=inline"
, flag CcLlvmBackend ? arg "-optc-Wno-unknown-pragmas" ]
-- | Package-specific warnings-related arguments, mostly suppressing various warnings.