[commit: ghc] wip/nfs-locking: Allow build flavours to control Ways. (0b327b5)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 00:06:52 UTC 2017


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

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

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

commit 0b327b564fbab286b6999040565046b5d6bf60c8
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Wed Mar 9 23:48:54 2016 +0000

    Allow build flavours to control Ways.
    
    See #188, #218.


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

0b327b564fbab286b6999040565046b5d6bf60c8
 src/Settings/Ways.hs | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/Settings/Ways.hs b/src/Settings/Ways.hs
index 0fee897..7e46406 100644
--- a/src/Settings/Ways.hs
+++ b/src/Settings/Ways.hs
@@ -1,14 +1,18 @@
 module Settings.Ways (getLibraryWays, getRtsWays) where
 
+import CmdLineFlag
 import Base
 import Expression
+import Oracles.Config.Flag
 import Predicates
+import Settings.Flavours.Quick
 import Settings.User
-import Oracles.Config.Flag
 
 -- | Combine default ways with user modifications
 getLibraryWays :: Expr [Way]
-getLibraryWays = fromDiffExpr $ defaultLibraryWays <> userLibraryWays
+getLibraryWays = fromDiffExpr $ mconcat [ defaultLibraryWays
+                                        , userLibraryWays
+                                        , flavourLibraryWays ]
 
 getRtsWays :: Expr [Way]
 getRtsWays = fromDiffExpr $ defaultRtsWays <> userRtsWays
@@ -24,6 +28,10 @@ defaultLibraryWays = mconcat
     , notStage0 ? append [profiling]
     , notStage0 ? platformSupportsSharedLibs ? append [dynamic] ]
 
+flavourLibraryWays :: Ways
+flavourLibraryWays = mconcat
+    [ cmdFlavour == Quick ? quickFlavourWays ]
+
 defaultRtsWays :: Ways
 defaultRtsWays = do
     ways <- getLibraryWays



More information about the ghc-commits mailing list