[commit: ghc] wip/nfs-locking: Use terseRun and new configuration options. (efb5972)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:50:35 UTC 2017


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

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

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

commit efb59728189c8a5bd9270d1c3f00787ed4b27913
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Tue Jan 13 02:29:17 2015 +0000

    Use terseRun and new configuration options.


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

efb59728189c8a5bd9270d1c3f00787ed4b27913
 src/Package/Compile.hs      | 4 ++--
 src/Package/Data.hs         | 4 ++--
 src/Package/Dependencies.hs | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/Package/Compile.hs b/src/Package/Compile.hs
index 50cf412..6badbb7 100644
--- a/src/Package/Compile.hs
+++ b/src/Package/Compile.hs
@@ -43,7 +43,7 @@ buildPackageCompile (Package name path _) (stage, dist, settings) =
         let deps = concat $ snd $ unzip $ filter ((== out) . fst) depContents
             srcs = filter ("//*hs" ?==) deps -- TODO: handle *.c sources
         need deps
-        run (Ghc stage) $ suffixArgs way
+        terseRun (Ghc stage) $ suffixArgs way
             <> wayHcArgs way
             <> arg SrcHcOpts
             <> packageArgs stage pkgData
@@ -51,6 +51,6 @@ buildPackageCompile (Package name path _) (stage, dist, settings) =
             -- TODO: now we have both -O and -O2
             <> arg ["-Wall", "-XHaskell2010", "-O2"]
             <> productArgs ["-odir", "-hidir", "-stubdir"] buildDir
-            <> arg "-split-objs"
+            <> when (splitObjects stage) (arg "-split-objs")
             <> arg ("-c":srcs)
             <> arg ["-o", out]
diff --git a/src/Package/Data.hs b/src/Package/Data.hs
index 7ff0d7d..a73a521 100644
--- a/src/Package/Data.hs
+++ b/src/Package/Data.hs
@@ -93,6 +93,6 @@ buildPackageData (Package name path _) (stage, dist, settings) =
         need ["shake/src/Package/Data.hs"]
         need [path </> name <.> "cabal"]
         when (doesFileExist $ configure <.> "ac") $ need [configure]
-        run GhcCabal cabalArgs
-        when (registerPackage settings) $ run (GhcPkg stage) ghcPkgArgs
+        terseRun GhcCabal cabalArgs
+        when (registerPackage settings) $ terseRun (GhcPkg stage) ghcPkgArgs
         postProcessPackageData $ pathDist </> "package-data.mk"
diff --git a/src/Package/Dependencies.hs b/src/Package/Dependencies.hs
index 1cb512d..f3a494b 100644
--- a/src/Package/Dependencies.hs
+++ b/src/Package/Dependencies.hs
@@ -10,13 +10,13 @@ buildPackageDependencies (Package name path _) (stage, dist, settings) =
     in
     (buildDir </> name <.> "m") %> \out -> do
         need ["shake/src/Package/Dependencies.hs"]
-        run (Ghc stage) $ arg "-M"
+        terseRun (Ghc stage) $ arg "-M"
             <> packageArgs stage pkgData
             <> includeArgs path dist
             <> productArgs ["-odir", "-stubdir"] buildDir
             <> arg ["-dep-makefile", out]
-            <> productArgs "-dep-suffix" (map suffix <$> ways settings)
-            <> srcArgs path pkgData
+            <> productArgs "-dep-suffix" (map wayPrefix <$> ways settings)
+            <> arg (pkgHsSources path dist)
             -- TODO: Check that skipping all _HC_OPTS is safe.
             -- <> arg SrcHcOpts
             -- TODO: i) is this needed? ii) shall we run GHC -M multiple times?



More information about the ghc-commits mailing list