diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-05-25 16:22:35 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-05-31 08:35:17 -0400 |
commit | 5c4421b1a2d45edfc31f2d37c8b4a47c619a424b (patch) | |
tree | 345186479e2cc75c314cb02ee4cca3f49fa3e100 /hadrian/src/Settings/Program.hs | |
parent | 83467435c4ea81daa7b97ed5d914f543f9e885a3 (diff) | |
download | haskell-5c4421b1a2d45edfc31f2d37c8b4a47c619a424b.tar.gz |
hadrian: Introduce new package database for executables needed to build stage0
These executables (such as hsc2hs) are built using the boot compiler and
crucially, most libraries from the global package database.
We also move other build-time executables to be built in this stage such
as linters which also cleans up which libraries end up in the global
package database. This allows us to remove hacks where linters-common is
removed from the package database when a bindist is created.
This fixes issues caused by infinite recursion due to bytestring adding
a dependency on template-haskell.
Fixes #21634
Diffstat (limited to 'hadrian/src/Settings/Program.hs')
-rw-r--r-- | hadrian/src/Settings/Program.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hadrian/src/Settings/Program.hs b/hadrian/src/Settings/Program.hs index d45b265008..62d41909d3 100644 --- a/hadrian/src/Settings/Program.hs +++ b/hadrian/src/Settings/Program.hs @@ -19,6 +19,9 @@ programContext stage pkg = do where wayFor prof dyn | prof && dyn = error "programContext: profiling+dynamic not supported" - | pkg == ghc && prof && stage > Stage0 = profiling - | dyn && stage > Stage0 = dynamic + | pkg == ghc && prof && notStage0 stage = profiling + | dyn && notStage0 stage = dynamic | otherwise = vanilla + + notStage0 (Stage0 {}) = False + notStage0 _ = True |