diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-05-12 11:52:03 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-16 08:30:44 -0400 |
commit | 3f316776bf25160bc5a3f10486456c6ab60ff282 (patch) | |
tree | 165b8540455c426e59e9d820de2f93ede8ee976f | |
parent | 27b904090182c8667640f3ef24e74584f3864a4c (diff) | |
download | haskell-3f316776bf25160bc5a3f10486456c6ab60ff282.tar.gz |
hadrian: Uniformly enable -dlint with enableLinting transformer
This fixes some bugs where
* -dcore-lint was being passed when building stage1 libraries with the
boot compiler
* -dcore-lint was not being passed when building executables.
Fixes #20135
-rw-r--r-- | hadrian/src/Flavour.hs | 1 | ||||
-rw-r--r-- | hadrian/src/Settings/Flavours/Validate.hs | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs index 9344563ba5..f63adc1ae0 100644 --- a/hadrian/src/Flavour.hs +++ b/hadrian/src/Flavour.hs @@ -12,6 +12,7 @@ module Flavour , enableProfiledGhc , disableDynamicGhcPrograms , disableProfiledLibs + , enableLinting , completeSetting , applySettings diff --git a/hadrian/src/Settings/Flavours/Validate.hs b/hadrian/src/Settings/Flavours/Validate.hs index e722d16061..a157d6716e 100644 --- a/hadrian/src/Settings/Flavours/Validate.hs +++ b/hadrian/src/Settings/Flavours/Validate.hs @@ -10,7 +10,7 @@ import {-# SOURCE #-} Settings.Default -- Please update doc/flavours.md when changing this file. validateFlavour :: Flavour -validateFlavour = werror $ defaultFlavour +validateFlavour = enableLinting $ werror $ defaultFlavour { name = "validate" , args = defaultBuilderArgs <> validateArgs <> defaultPackageArgs , libraryWays = Set.fromList <$> @@ -30,10 +30,11 @@ validateArgs = sourceArgs SourceArgs { hsDefault = mconcat [ stage0 ? pure ["-O0", "-H64m"] -- See #11487 , notStage0 ? arg "-fllvm-fill-undef-with-garbage" + , notStage0 ? arg "-dno-debug-output" ] - , hsLibrary = pure ["-O", "-dcore-lint", "-dno-debug-output"] + , hsLibrary = pure ["-O"] , hsCompiler = mconcat [ stage0 ? pure ["-O2", "-DDEBUG"] - , notStage0 ? pure ["-O", "-dcore-lint", "-dno-debug-output"] + , notStage0 ? pure ["-O" ] ] , hsGhc = pure ["-O"] } |