Commit d7cedd9d authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

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.
parent b741d19d
Pipeline #11931 passed with stages
in 580 minutes and 34 seconds
......@@ -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.
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