[Git][ghc/ghc][wip/hadrian-cross-stage2] fix
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Fri Sep 22 10:13:49 UTC 2023
Matthew Pickering pushed to branch wip/hadrian-cross-stage2 at Glasgow Haskell Compiler / GHC
Commits:
9909b4b8 by GHC GitLab CI at 2023-09-22T10:13:42+00:00
fix
- - - - -
2 changed files:
- hadrian/src/Rules/BinaryDist.hs
- hadrian/src/Rules/CabalReinstall.hs
Changes:
=====================================
hadrian/src/Rules/BinaryDist.hs
=====================================
@@ -130,10 +130,12 @@ buildBinDistDir :: FilePath -> Stage -> Stage -> Action ()
buildBinDistDir root library_stage executable_stage = do
-- We 'need' all binaries and libraries
lib_pkgs <- stagePackages library_stage
- (lib_targets, _) <- partitionEithers <$> mapM pkgTarget lib_pkgs
+ (lib_targets, _) <- partitionEithers <$> mapM (pkgTarget library_stage executable_stage) lib_pkgs
bin_pkgs <- stagePackages executable_stage
- (_, bin_targets) <- partitionEithers <$> mapM pkgTarget bin_pkgs
+ (_, bin_targets) <- partitionEithers <$> mapM (pkgTarget library_stage executable_stage) bin_pkgs
+
+ liftIO $ print (library_stage, executable_stage, lib_targets, bin_targets)
cross <- flag CrossCompiling
@@ -409,11 +411,11 @@ bindistInstallFiles =
-- for all libraries and programs that are needed for a complete build.
-- For libraries, it returns the path to the @.conf@ file in the package
-- database. For programs, it returns the path to the compiled executable.
-pkgTarget :: Package -> Action (Either FilePath (Package, FilePath))
-pkgTarget pkg
- | isLibrary pkg = Left <$> pkgConfFile (vanillaContext Stage1 pkg)
+pkgTarget :: Stage -> Stage -> Package -> Action (Either FilePath (Package, FilePath))
+pkgTarget library_stage executable_stage pkg
+ | isLibrary pkg = Left <$> pkgConfFile (vanillaContext library_stage pkg)
| otherwise = do
- path <- programPath =<< programContext Stage1 pkg
+ path <- programPath =<< programContext executable_stage pkg
return (Right (pkg, path))
useGhcPrefix :: Package -> Bool
=====================================
hadrian/src/Rules/CabalReinstall.hs
=====================================
@@ -48,7 +48,7 @@ cabalBuildRules = do
priority 2.0 $ root -/- "stage-cabal" -/- "bin" -/- ".stamp" %> \stamp -> do
-- We 'need' all binaries and libraries
all_pkgs <- stagePackages Stage1
- (lib_targets, bin_targets) <- partitionEithers <$> mapM pkgTarget all_pkgs
+ (lib_targets, bin_targets) <- partitionEithers <$> mapM (pkgTarget Stage1 Stage1) all_pkgs
cross <- flag CrossCompiling
iserv_targets <- if cross then pure [] else iservBins
need (lib_targets ++ (map (\(_, p) -> p) (bin_targets ++ iserv_targets)))
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9909b4b85ecfac2d88188049b1422ada24a0a247
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9909b4b85ecfac2d88188049b1422ada24a0a247
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/20230922/184385e4/attachment-0001.html>
More information about the ghc-commits
mailing list