[commit: ghc] wip/nfs-locking: Depend on RTS only when building GHC program (3ae4e1d)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:47:23 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/3ae4e1d0016ae2c28030da32180e5a5bda18de57/ghc
>---------------------------------------------------------------
commit 3ae4e1d0016ae2c28030da32180e5a5bda18de57
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Sat Jan 7 03:22:41 2017 +0000
Depend on RTS only when building GHC program
>---------------------------------------------------------------
3ae4e1d0016ae2c28030da32180e5a5bda18de57
src/Rules/Program.hs | 7 ++++---
src/Settings/Flavours/Quickest.hs | 6 ++----
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/Rules/Program.hs b/src/Rules/Program.hs
index 92aa4c1..b1577e2 100644
--- a/src/Rules/Program.hs
+++ b/src/Rules/Program.hs
@@ -73,9 +73,10 @@ buildBinary rs context at Context {..} bin = do
binDeps <- if stage == Stage0 && package == ghcCabal
then hsSources context
else do
- deps <- contextDependencies context
- ways <- interpretInContext context (getLibraryWays <> getRtsWays)
- needContext $ deps ++ [ rtsContext { way = w } | w <- ways ]
+ needContext =<< contextDependencies context
+ when (package == ghc) $ do
+ ways <- interpretInContext context (getLibraryWays <> getRtsWays)
+ needContext [ rtsContext { way = w } | w <- ways ]
let path = buildPath context
cObjs <- map (objectPath context) <$> pkgDataList (CSrcs path)
hsObjs <- hsObjects context
diff --git a/src/Settings/Flavours/Quickest.hs b/src/Settings/Flavours/Quickest.hs
index 477a245..9f95957 100644
--- a/src/Settings/Flavours/Quickest.hs
+++ b/src/Settings/Flavours/Quickest.hs
@@ -8,10 +8,8 @@ quickestFlavour :: Flavour
quickestFlavour = defaultFlavour
{ name = "quickest"
, args = defaultBuilderArgs <> quickestArgs <> defaultPackageArgs
- , libraryWays = defaultLibraryWays <> quickestLibraryWays }
+ , libraryWays = append [vanilla]
+ , rtsWays = append [vanilla] }
quickestArgs :: Args
quickestArgs = builder Ghc ? arg "-O0"
-
-quickestLibraryWays :: Ways
-quickestLibraryWays = remove [profiling]
More information about the ghc-commits
mailing list