[commit: ghc] wip/nfs-locking: Add missing profiling flags (9c8d9bf)

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


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

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

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

commit 9c8d9bf40b129f2faa8f50525c3fac5b322d808f
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Fri Jan 6 01:59:23 2017 +0000

    Add missing profiling flags


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

9c8d9bf40b129f2faa8f50525c3fac5b322d808f
 src/Predicate.hs                  | 10 +++++++++-
 src/Settings/Packages/Compiler.hs |  3 +++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/Predicate.hs b/src/Predicate.hs
index d38d9d5..5da5c54 100644
--- a/src/Predicate.hs
+++ b/src/Predicate.hs
@@ -2,7 +2,7 @@
 -- | Convenient predicates
 module Predicate (
     module Expression, stage, stage0, stage1, stage2, notStage0, builder,
-    package, notPackage, input, output, way
+    package, notPackage, input, inputs, output, outputs, way
     ) where
 
 import Base
@@ -52,10 +52,18 @@ instance BuilderLike a => BuilderLike (FilePath -> a) where
 input :: FilePattern -> Predicate
 input f = any (f ?==) <$> getInputs
 
+-- | Does any of the input files match any of the given patterns?
+inputs :: [FilePattern] -> Predicate
+inputs = anyM input
+
 -- | Does any of the output files match a given pattern?
 output :: FilePattern -> Predicate
 output f = any (f ?==) <$> getOutputs
 
+-- | Does any of the output files match any of the given patterns?
+outputs :: [FilePattern] -> Predicate
+outputs = anyM output
+
 -- | Is the current build 'Way' equal to a certain value?
 way :: Way -> Predicate
 way w = (w ==) <$> getWay
diff --git a/src/Settings/Packages/Compiler.hs b/src/Settings/Packages/Compiler.hs
index 308b3c2..9280a81 100644
--- a/src/Settings/Packages/Compiler.hs
+++ b/src/Settings/Packages/Compiler.hs
@@ -15,6 +15,9 @@ compilerPackageArgs = package compiler ? do
     path    <- getBuildPath
     mconcat [ builder Alex ? arg "--latin1"
 
+            , builder (Ghc CompileHs) ?
+              inputs ["//GHC.hs", "//GhcMake.hs"] ? arg "-fprof-auto"
+
             , builder GhcCabal ? mconcat
               [ arg $ "--ghc-option=-DSTAGE=" ++ show (fromEnum stage + 1)
               , arg "--disable-library-for-ghci"



More information about the ghc-commits mailing list