From ba6ce52cb0c0291a21872109062948bb044d97fd Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 24 Oct 2019 19:54:30 -0400 Subject: 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. --- hadrian/src/Settings/Warnings.hs | 4 +--- 1 file changed, 1 insertion(+), 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. -- cgit v1.2.1