[commit: ghc] wip/nfs-locking: Depend on ghc-split only when building with split objects. (9580d01)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:04:47 UTC 2017


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

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/9580d01895bb231dd38f8000eb7ad1929ee75962/ghc

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

commit 9580d01895bb231dd38f8000eb7ad1929ee75962
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sat Jan 9 17:09:03 2016 +0000

    Depend on ghc-split only when building with split objects.
    
    See #81. [skip ci]


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

9580d01895bb231dd38f8000eb7ad1929ee75962
 src/Rules/Generate.hs        | 7 ++++---
 src/Settings/Builders/Ghc.hs | 7 ++++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/Rules/Generate.hs b/src/Rules/Generate.hs
index 2b2962b..b7a360a 100644
--- a/src/Rules/Generate.hs
+++ b/src/Rules/Generate.hs
@@ -42,8 +42,10 @@ includesDependencies = ("includes" -/-) <$>
     , "ghcversion.h" ]
 
 defaultDependencies :: [FilePath]
-defaultDependencies =
-    includesDependencies ++ libffiDependencies ++ integerGmpDependencies
+defaultDependencies = concat
+    [ includesDependencies
+    , libffiDependencies
+    , integerGmpDependencies ]
 
 ghcPrimDependencies :: Stage -> [FilePath]
 ghcPrimDependencies stage = ((targetPath stage ghcPrim -/- "build") -/-) <$>
@@ -77,7 +79,6 @@ compilerDependencies stage =
        , "primop-vector-tys-exports.hs-incl"
        , "primop-vector-tycons.hs-incl"
        , "primop-vector-tys.hs-incl" ]
-    ++ ["inplace/lib/bin/ghc-split"]
 
 generatedDependencies :: Stage -> Package -> [FilePath]
 generatedDependencies stage pkg
diff --git a/src/Settings/Builders/Ghc.hs b/src/Settings/Builders/Ghc.hs
index 9a07fc2..bc37a04 100644
--- a/src/Settings/Builders/Ghc.hs
+++ b/src/Settings/Builders/Ghc.hs
@@ -26,7 +26,7 @@ ghcBuilderArgs = stagedBuilder Ghc ? do
             , notStage0 ? arg "-O2"
             , arg "-Wall"
             , arg "-fwarn-tabs"
-            , splitObjects ? arg "-split-objs"
+            , splitObjectsArgs
             , not buildObj ? arg "-no-auto-link-packages"
             , not buildObj ? append [ "-optl-l" ++ lib | lib <- libs    ]
             , not buildObj ? append [ "-optl-L" ++ dir | dir <- libDirs ]
@@ -34,6 +34,11 @@ ghcBuilderArgs = stagedBuilder Ghc ? do
             , append =<< getInputs
             , arg "-o", arg =<< getOutput ]
 
+splitObjectsArgs :: Args
+splitObjectsArgs = splitObjects ? do
+    lift $ need ["inplace/lib/bin/ghc-split"]
+    arg "-split-objs"
+
 ghcMBuilderArgs :: Args
 ghcMBuilderArgs = stagedBuilder GhcM ? do
     ways <- getWays



More information about the ghc-commits mailing list