[Git][ghc/ghc][wip/hadrian-cross-stage2] Build static cross binaries
Matthew Pickering (@mpickering)
gitlab at gitlab.haskell.org
Mon Sep 25 10:01:50 UTC 2023
Matthew Pickering pushed to branch wip/hadrian-cross-stage2 at Glasgow Haskell Compiler / GHC
Commits:
1a90b7be by GHC GitLab CI at 2023-09-25T10:01:29+00:00
Build static cross binaries
- - - - -
1 changed file:
- hadrian/src/Settings/Program.hs
Changes:
=====================================
hadrian/src/Settings/Program.hs
=====================================
@@ -5,6 +5,7 @@ module Settings.Program
import Base
import Context
import Oracles.Flavour
+import Oracles.Setting
import Packages
-- TODO: there is duplication and inconsistency between this and
@@ -14,14 +15,16 @@ programContext :: Stage -> Package -> Action Context
programContext stage pkg = do
profiled <- askGhcProfiled stage
dynGhcProgs <- askDynGhcPrograms stage --dynamicGhcPrograms =<< flavour
- return $ Context stage pkg (wayFor profiled dynGhcProgs) Final
+ -- Have to build static if it's a cross stage as we won't distribute the libraries built for the host.
+ cross <- crossStage stage
+ return $ Context stage pkg (wayFor profiled dynGhcProgs cross) Final
- where wayFor prof dyn
- | prof && dyn =
+ where wayFor prof dyn cross
+ | prof && dyn =
error "programContext: profiling+dynamic not supported"
| pkg == ghc && prof && notStage0 stage = profiling
- | dyn && notStage0 stage = dynamic
- | otherwise = vanilla
+ | dyn && notStage0 stage && not cross = dynamic
+ | otherwise = vanilla
notStage0 (Stage0 {}) = False
notStage0 _ = True
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1a90b7be89b1f29d0f050190e9f1276975fcb46b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1a90b7be89b1f29d0f050190e9f1276975fcb46b
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/20230925/0e0fd080/attachment-0001.html>
More information about the ghc-commits
mailing list