Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion compiler/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,12 @@ ghcAutogen verbosity lbi@LocalBuildInfo{pkgDescrFile,withPrograms,componentNameM
_ -> error "Couldn't find unique cabal library when building ghc"

let cGhcInternalUnitId = case lookupPackageName installedPkgs (mkPackageName "ghc-internal") of
-- We assume there is exactly one copy of `ghc-internal` in our dependency closure
-- We assume there is exactly one copy of `ghc-internal` in our dependency closure for
-- ghc >= 9.10 that have the ghc-internal library.
[(_,[packageInfo])] -> unUnitId $ installedUnitId packageInfo
-- for ghc < 9.10 we expect to find none.
[] -> "<unavailable>"
-- for anything else this is an issue.
_ -> error "Couldn't find unique ghc-internal library when building ghc"

-- Write GHC.Settings.Config
Expand Down