[commit: ghc] master: Revert dynamically linking ghc. (4efafe7)

git at git.haskell.org git at git.haskell.org
Tue Dec 11 23:21:18 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/4efafe7e5288532b385bbfe3cd684ddcda0f3b0a/ghc

>---------------------------------------------------------------

commit 4efafe7e5288532b385bbfe3cd684ddcda0f3b0a
Author: David Eichmann <EichmannD at gmail.com>
Date:   Tue Dec 11 13:02:25 2018 -0500

    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


>---------------------------------------------------------------

4efafe7e5288532b385bbfe3cd684ddcda0f3b0a
 hadrian/src/Rules/Program.hs         |  4 +++-
 hadrian/src/Rules/Test.hs            |  6 +++++-
 hadrian/src/Settings/Builders/Ghc.hs | 23 +++++++++++++----------
 3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/hadrian/src/Rules/Program.hs b/hadrian/src/Rules/Program.hs
index 316cc44..32e7496 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 b72c1b9..461a95f 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 04aea32..b656d1f 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



More information about the ghc-commits mailing list