diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-05-14 09:24:17 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-22 00:07:42 -0400 |
commit | 8c871c07f538045b9bb7bba5dad4896c8def535b (patch) | |
tree | 89bca623fb27fbcaffeef3ff123b2fedc451588f /hadrian | |
parent | b4d240d3c0a238514db5b4750ba70b7569f1ed02 (diff) | |
download | haskell-8c871c07f538045b9bb7bba5dad4896c8def535b.tar.gz |
hadrian: Add omit_pragmas transformer
This transformer builds stage2 GHC with -fomit-interface-pragmas which
can greatly reduce the amount of rebuilding but still allows most the
tests to pass.
Diffstat (limited to 'hadrian')
-rw-r--r-- | hadrian/src/Flavour.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs index 61bca98053..d8f34347f4 100644 --- a/hadrian/src/Flavour.hs +++ b/hadrian/src/Flavour.hs @@ -43,6 +43,7 @@ flavourTransformers = M.fromList , "profiled_ghc" =: enableProfiledGhc , "no_dynamic_ghc" =: disableDynamicGhcPrograms , "no_profiled_libs" =: disableProfiledLibs + , "omit_pragmas" =: omitPragmas ] where (=:) = (,) @@ -179,6 +180,13 @@ disableProfiledLibs :: Flavour -> Flavour disableProfiledLibs flavour = flavour { libraryWays = filter (not . wayUnit Profiling) <$> libraryWays flavour } +-- | Build stage2 compiler with -fomit-interface-pragmas to reduce +-- recompilation. +omitPragmas :: Flavour -> Flavour +omitPragmas = + let Right kv = parseKV "stage1.ghc.ghc.hs.opts += -fomit-interface-pragmas" + Right transformer = applySetting kv + in transformer -- * CLI and <root>/hadrian.settings options |