[Git][ghc/ghc][master] hadrian: Move ghcBinDeps into ghcLibDeps
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Sat Oct 14 23:18:20 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
32523713 by Matthew Pickering at 2023-10-14T19:17:49-04:00
hadrian: Move ghcBinDeps into ghcLibDeps
This completes a5227080b57cb51ac34d4c9de1accdf6360b818b, the
`ghc-usage.txt` and `ghci-usage.txt` file are also used by the `ghc`
library so need to make sure they are present in the libdir even if we
are not going to build `ghc-bin`.
This also fixes things for cross compilers because the stage2
cross-compiler requires the ghc-usage.txt file, but we are using
the stage2 lib folder but not building stage3:exe:ghc-bin so
ghc-usage.txt was not being generated.
- - - - -
3 changed files:
- hadrian/src/Base.hs
- hadrian/src/Builder.hs
- hadrian/src/Rules/Program.hs
Changes:
=====================================
hadrian/src/Base.hs
=====================================
@@ -32,7 +32,7 @@ module Base (
hadrianPath, configPath, configFile, sourcePath, shakeFilesDir,
stageBinPath, stageLibPath, templateHscPath,
buildTargetFile, hostTargetFile, targetTargetFile,
- ghcBinDeps, ghcLibDeps, haddockDeps,
+ ghcLibDeps, haddockDeps,
relativePackageDbPath, packageDbPath, packageDbStamp, mingwStamp,
systemCxxStdLibConf, systemCxxStdLibConfPath
, PackageDbLoc(..), Inplace(..)
@@ -151,17 +151,12 @@ ghcLibDeps stage iplace = do
, "llvm-passes"
, "ghc-interp.js"
, "settings"
+ , "ghc-usage.txt"
+ , "ghci-usage.txt"
]
cxxStdLib <- systemCxxStdLibConfPath (PackageDbLoc stage iplace)
return (cxxStdLib : ps)
--- | Files the GHC binary depends on.
-ghcBinDeps :: Stage -> Action [FilePath]
-ghcBinDeps stage = mapM (\f -> stageLibPath stage <&> (-/- f))
- [ "ghc-usage.txt"
- , "ghci-usage.txt"
- ]
-
-- | Files the `haddock` binary depends on
haddockDeps :: Stage -> Action [FilePath]
haddockDeps stage = do
=====================================
hadrian/src/Builder.hs
=====================================
@@ -238,17 +238,12 @@ instance H.Builder Builder where
-- changes (#18001).
_bootGhcVersion <- setting GhcVersion
pure []
- Ghc _ stage -> do
+ Ghc {} -> do
root <- buildRoot
touchyPath <- programPath (vanillaContext (Stage0 InTreeLibs) touchy)
unlitPath <- builderPath Unlit
- -- GHC from the previous stage is used to build artifacts in the
- -- current stage. Need the previous stage's GHC deps.
- ghcdeps <- ghcBinDeps (predStage stage)
-
return $ [ unlitPath ]
- ++ ghcdeps
++ [ touchyPath | windowsHost ]
++ [ root -/- mingwStamp | windowsHost ]
-- proxy for the entire mingw toolchain that
=====================================
hadrian/src/Rules/Program.hs
=====================================
@@ -85,8 +85,6 @@ buildProgram bin ctx@(Context{..}) rs = do
need [template]
-- Custom dependencies: this should be modeled better in the
-- Cabal file somehow.
- when (package == ghc) $ do
- need =<< ghcBinDeps stage
when (package == haddock) $ do
-- Haddock has a resource folder
need =<< haddockDeps stage
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/32523713e044732ac37f2e2cdce2f6820f9c0997
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/32523713e044732ac37f2e2cdce2f6820f9c0997
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231014/a3bd5131/attachment-0001.html>
More information about the ghc-commits
mailing list