Skip to content
Snippets Groups Projects
Commit 3c22f5be authored by Teo Camarasu's avatar Teo Camarasu Committed by Cheng Shao
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

(cherry picked from commit dd339c7a)
parent f3ce383c
No related branches found
No related tags found
No related merge requests found
...@@ -132,15 +132,11 @@ mkToolTarget es p = do ...@@ -132,15 +132,11 @@ mkToolTarget es p = do
-- critically the `exe:ghc` component as that depends on the GHC library -- critically the `exe:ghc` component as that depends on the GHC library
-- which takes a while to compile. -- which takes a while to compile.
toolTargets :: [Package] toolTargets :: [Package]
toolTargets = [ binary toolTargets = [ cabalSyntax
, bytestring
, cabalSyntax
, cabal , cabal
, compiler , compiler
, containers
, directory , directory
, process , process
, exceptions
, filepath , filepath
, osString , osString
-- , ghc -- # depends on ghc library -- , ghc -- # depends on ghc library
...@@ -157,12 +153,8 @@ toolTargets = [ binary ...@@ -157,12 +153,8 @@ toolTargets = [ binary
, hsc2hs -- # executable , hsc2hs -- # executable
, hpc , hpc
, hpcBin -- # executable , hpcBin -- # executable
, mtl
, parsec
, time , time
, templateHaskellNext , templateHaskellNext
, text
, transformers
, semaphoreCompat , semaphoreCompat
, unlit -- # executable , unlit -- # executable
] ++ if windowsHost then [ win32 ] else [ unix ] ] ++ if windowsHost then [ win32 ] else [ unix ]
......
...@@ -80,40 +80,38 @@ stageBootPackages = return ...@@ -80,40 +80,38 @@ stageBootPackages = return
stage0Packages :: Action [Package] stage0Packages :: Action [Package]
stage0Packages = do stage0Packages = do
cross <- flag CrossCompiling cross <- flag CrossCompiling
return $ [ binary return $ [ cabalSyntax
, bytestring
, cabalSyntax
, cabal , cabal
, compiler , compiler
, containers , directory -- depends on filepath
, directory , filepath -- depends on os-string
, process
, exceptions
, filepath
, ghc , ghc
, runGhc
, ghcBoot , ghcBoot
, ghcBootThNext , ghcBootThNext
, ghcPlatform
, ghcHeap , ghcHeap
, ghcPkg
, ghcPlatform
, ghcToolchain , ghcToolchain
, ghci , ghci
, ghcPkg
, haddock , haddock
, hsc2hs , hp2ps
, hpc , hpc
, hpcBin , hpcBin
, mtl , hsc2hs
, osString , osString -- new library not yet present for boot compilers
, parsec , process -- depends on filepath
, semaphoreCompat , runGhc
, time , semaphoreCompat -- depends on
, templateHaskellNext , templateHaskellNext
, text , time -- depends on win32
, transformers
, unlit , unlit
, hp2ps
, if windowsHost then win32 else unix , 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 ] ++ [ terminfo | not windowsHost, not cross ]
++ [ timeout | windowsHost ] ++ [ timeout | windowsHost ]
...@@ -143,12 +141,14 @@ stage1Packages = do ...@@ -143,12 +141,14 @@ stage1Packages = do
[ libraries0 -- Build all Stage0 libraries in Stage1 [ libraries0 -- Build all Stage0 libraries in Stage1
, [ array , [ array
, base , base
, binary
, bytestring
, containers , containers
, deepseq , deepseq
, exceptions , exceptions
, ghc , ghc
, ghcBootTh
, ghcBignum , ghcBignum
, ghcBootTh
, ghcCompact , ghcCompact
, ghcExperimental , ghcExperimental
, ghcInternal , ghcInternal
...@@ -158,11 +158,15 @@ stage1Packages = do ...@@ -158,11 +158,15 @@ stage1Packages = do
, hp2ps , hp2ps
, hsc2hs , hsc2hs
, integerGmp , integerGmp
, mtl
, parsec
, pretty , pretty
, rts , rts
, semaphoreCompat , semaphoreCompat
, templateHaskell
, stm , stm
, templateHaskell
, text
, transformers
, unlit , unlit
, xhtml , xhtml
, if winTarget then win32 else unix , 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