[commit: ghc] wip/nfs-locking: Fix Quick flavour (6d6834a)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:17:49 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/6d6834a6abebaff0d4aa60e615a027d68ed964d9/ghc
>---------------------------------------------------------------
commit 6d6834a6abebaff0d4aa60e615a027d68ed964d9
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Mon Jun 20 03:08:45 2016 +0100
Fix Quick flavour
See #259, #268.
>---------------------------------------------------------------
6d6834a6abebaff0d4aa60e615a027d68ed964d9
src/Settings/Flavours/Quick.hs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/Settings/Flavours/Quick.hs b/src/Settings/Flavours/Quick.hs
index e3f0a5d..81fe178 100644
--- a/src/Settings/Flavours/Quick.hs
+++ b/src/Settings/Flavours/Quick.hs
@@ -1,9 +1,17 @@
module Settings.Flavours.Quick (quickFlavourArgs, quickFlavourWays) where
+import Context
+import GHC
import Predicate
+optimise :: Context -> Bool
+optimise Context {..} = stage == Stage0 && package `elem` [compiler, ghc]
+ || stage == Stage1 && isLibrary package
+
quickFlavourArgs :: Args
-quickFlavourArgs = builder Ghc ? arg "-O0"
+quickFlavourArgs = builder Ghc ? do
+ context <- getContext
+ if optimise context then arg "-O" else arg "-O0"
quickFlavourWays :: Ways
quickFlavourWays = remove [profiling]
More information about the ghc-commits
mailing list