summaryrefslogtreecommitdiff
path: root/hadrian
diff options
context:
space:
mode:
authorDavid Eichmann <EichmannD@gmail.com>2018-12-11 13:02:25 -0500
committerBen Gamari <ben@smart-cactus.org>2018-12-11 13:02:26 -0500
commit4efafe7e5288532b385bbfe3cd684ddcda0f3b0a (patch)
tree3d000528a60e64840fd5f84386ddc522b0172441 /hadrian
parent50f0cd4647ffc6300c762375419831a11f8648e6 (diff)
downloadhaskell-4efafe7e5288532b385bbfe3cd684ddcda0f3b0a.tar.gz
Revert dynamically linking ghc.
Building a dynamically linked ghc is broken do to incorrectly building and installing libffi. This disables building a dynamically linked ghc and ghc-iserv-dyn while keeping most of the code in the relevant commits: 79d5427e1 and 89fa34ecd Test Plan: Ensure build environment does NOT have a system libffi installed (you may want to use a nix environment). Then `hadrian/build.sh -c --flavour=default`. Reviewers: bgamari, alpmestan Reviewed By: alpmestan Subscribers: rwbarton, carter GHC Trac Issues: #15837 Differential Revision: https://phabricator.haskell.org/D5430
Diffstat (limited to 'hadrian')
-rw-r--r--hadrian/src/Rules/Program.hs4
-rw-r--r--hadrian/src/Rules/Test.hs6
-rw-r--r--hadrian/src/Settings/Builders/Ghc.hs23
3 files changed, 21 insertions, 12 deletions
diff --git a/hadrian/src/Rules/Program.hs b/hadrian/src/Rules/Program.hs
index 316cc44fb5..32e74967d1 100644
--- a/hadrian/src/Rules/Program.hs
+++ b/hadrian/src/Rules/Program.hs
@@ -46,7 +46,9 @@ getProgramContexts stage = do
-- iserv gets its names from Packages.hs:programName
let allCtxs = [ vanillaContext stage pkg
, Context stage pkg profiling
- , Context stage pkg dynamic
+ -- TODO Dynamic way has been reverted as the dynamic build is
+ -- broken. See #15837.
+ -- , Context stage pkg dynamic
]
forM allCtxs $ \ctx -> do
name <- programName ctx
diff --git a/hadrian/src/Rules/Test.hs b/hadrian/src/Rules/Test.hs
index b72c1b964b..461a95f93a 100644
--- a/hadrian/src/Rules/Test.hs
+++ b/hadrian/src/Rules/Test.hs
@@ -113,7 +113,11 @@ needIservBins = do
rtsways <- interpretInContext (vanillaContext Stage1 ghc) getRtsWays
need =<< traverse programPath
[ Context Stage1 iserv w
- | w <- [vanilla, profiling, dynamic]
+ | w <- [vanilla, profiling
+ -- TODO dynamic way has been reverted as the dynamic build
+ -- is broken. See #15837.
+ -- , dynamic
+ ]
, w `elem` rtsways
]
diff --git a/hadrian/src/Settings/Builders/Ghc.hs b/hadrian/src/Settings/Builders/Ghc.hs
index 04aea32d07..b656d1f8b8 100644
--- a/hadrian/src/Settings/Builders/Ghc.hs
+++ b/hadrian/src/Settings/Builders/Ghc.hs
@@ -155,13 +155,16 @@ includeGhcArgs = do
-- Check if building dynamically is required. GHC is a special case that needs
-- to be built dynamically if any of the RTS ways is dynamic.
requiresDynamic :: Expr Bool
-requiresDynamic = do
- pkg <- getPackage
- way <- getWay
- rtsWays <- getRtsWays
- let
- dynRts = any (Dynamic `wayUnit`) rtsWays
- dynWay = Dynamic `wayUnit` way
- return $ if pkg == ghc
- then dynRts || dynWay
- else dynWay
+requiresDynamic = wayUnit Dynamic <$> getWay
+ -- TODO This logic has been reverted as the dynamic build is broken.
+ -- See #15837.
+ --
+ -- pkg <- getPackage
+ -- way <- getWay
+ -- rtsWays <- getRtsWays
+ -- let
+ -- dynRts = any (Dynamic `wayUnit`) rtsWays
+ -- dynWay = Dynamic `wayUnit` way
+ -- return $ if pkg == ghc
+ -- then dynRts || dynWay
+ -- else dynWay