Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED at Glasgow Haskell Compiler / GHC Commits: aa97891e by Sven Tennie at 2025-11-30T12:42:13+01:00 Do not genererate ghcLibDeps for >=Stage2 when cross-compiling Otherwise, the build fails trying to get the `succStage(Stage2)`. - - - - - 1 changed file: - hadrian/src/Rules/Register.hs Changes: ===================================== hadrian/src/Rules/Register.hs ===================================== @@ -11,7 +11,7 @@ import Oracles.Setting import Hadrian.BuildPath import Hadrian.Expression import Hadrian.Haskell.Cabal -import Oracles.Flag (targetSupportsGhciObjects) +import Oracles.Flag (targetSupportsGhciObjects, Flag (..)) import Packages import Rules.Rts import Settings @@ -34,6 +34,7 @@ import qualified Distribution.Compat.CharParsing as CabalCharParsing import qualified Hadrian.Haskell.Cabal.Parse as Cabal import qualified System.Directory as IO +import Settings.Builders.Common (flag) -- * Configuring @@ -118,7 +119,11 @@ registerPackageRules rs stage iplace = do pkgName <- getPackageNameFromConfFile conf let pkg = unsafeFindPackageByName pkgName - when (pkg == compiler) $ need =<< ghcLibDeps stage iplace + -- Cross-compilers have only libraries in their 2nd stage. So, we don't + -- need config files for binaries there. + cross <- flag CrossCompiling + when (pkg == compiler && (not cross || stage <= Stage1)) $ do + need =<< ghcLibDeps stage iplace -- Only used in guard when Stage0 {} but can be GlobalLibs or InTreeLibs isBoot <- (pkg `notElem`) <$> stagePackages stage View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/aa97891e8d5215c995366d2fdb75fbf3... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/aa97891e8d5215c995366d2fdb75fbf3... You're receiving this email because of your account on gitlab.haskell.org.