Skip to content
Snippets Groups Projects
Commit 290143b6 authored by Teo Camarasu's avatar Teo Camarasu
Browse files

Remove unecessary stage0 packages

Historically quite a few packages had to be stage0 as they depended on
`template-haskell` and that was stage0. In #23536 we made it so that was
no longer the case. This allows us to remove a bunch of packages from
this list.

A few still remain. A new version of `Win32` is required by
`semaphore-compat`. Including `Win32` in the stage0 set requires also
including `filepath` because otherwise Hadrian's dependency logic gets
confused. Once our boot compiler has a newer version of `Win32` all of
these will be able to be dropped.

Resolves #24652
parent d7a3d6b5
Branches wip/T24652
No related tags found
1 merge request!12448Remove unecessary stage0 packages
Pipeline #93439 passed
......@@ -132,15 +132,11 @@ mkToolTarget es p = do
-- critically the `exe:ghc` component as that depends on the GHC library
-- which takes a while to compile.
toolTargets :: [Package]
toolTargets = [ binary
, bytestring
, cabalSyntax
toolTargets = [ cabalSyntax
, cabal
, compiler
, containers
, directory
, process
, exceptions
, filepath
, osString
-- , ghc -- # depends on ghc library
......@@ -157,12 +153,8 @@ toolTargets = [ binary
, hsc2hs -- # executable
, hpc
, hpcBin -- # executable
, mtl
, parsec
, time
, templateHaskellNext
, text
, transformers
, semaphoreCompat
, unlit -- # executable
] ++ if windowsHost then [ win32 ] else [ unix ]
......
......@@ -80,40 +80,38 @@ stageBootPackages = return
stage0Packages :: Action [Package]
stage0Packages = do
cross <- flag CrossCompiling
return $ [ binary
, bytestring
, cabalSyntax
return $ [ cabalSyntax
, cabal
, compiler
, containers
, directory
, process
, exceptions
, filepath
, directory -- depends on filepath
, filepath -- depends on os-string
, ghc
, runGhc
, ghcBoot
, ghcBootThNext
, ghcPlatform
, ghcHeap
, ghcPkg
, ghcPlatform
, ghcToolchain
, ghci
, ghcPkg
, haddock
, hsc2hs
, hp2ps
, hpc
, hpcBin
, mtl
, osString
, parsec
, semaphoreCompat
, time
, hsc2hs
, osString -- new library not yet present for boot compilers
, process -- depends on filepath
, runGhc
, semaphoreCompat -- depends on
, templateHaskellNext
, text
, transformers
, time -- depends on win32
, unlit
, hp2ps
, if windowsHost then win32 else unix
-- We must use the in-tree `Win32` as the version
-- bundled with GHC 9.6 is too old for `semaphore-compat`.
-- Once 9.6 is no longer a boot compiler, we can drop win32/unix.
-- These depend on `filepath`/`os-string` through an automatic flag
-- that confused Hadrian, so we must make those a stage0 package as well.
-- Once we drop `Win32`/`unix` it should be possible to drop those too.
]
++ [ terminfo | not windowsHost, not cross ]
++ [ timeout | windowsHost ]
......@@ -143,12 +141,14 @@ stage1Packages = do
[ libraries0 -- Build all Stage0 libraries in Stage1
, [ array
, base
, binary
, bytestring
, containers
, deepseq
, exceptions
, ghc
, ghcBootTh
, ghcBignum
, ghcBootTh
, ghcCompact
, ghcExperimental
, ghcInternal
......@@ -158,11 +158,15 @@ stage1Packages = do
, hp2ps
, hsc2hs
, integerGmp
, mtl
, parsec
, pretty
, rts
, semaphoreCompat
, templateHaskell
, stm
, templateHaskell
, text
, transformers
, unlit
, xhtml
, if winTarget then win32 else unix
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment