[commit: ghc] wip/nfs-locking: Drop trackBuildSystem setting (4ad8082)

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


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

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

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

commit 4ad80828794f13c3e9139a68f06f3f2b6db1428f
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Thu Jul 14 02:04:32 2016 +0100

    Drop trackBuildSystem setting


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

4ad80828794f13c3e9139a68f06f3f2b6db1428f
 src/Oracles/ArgsHash.hs        |  3 +--
 src/Rules/Generators/Common.hs |  6 ++----
 src/Rules/Gmp.hs               |  2 +-
 src/Rules/Libffi.hs            |  2 +-
 src/UserSettings.hs            | 13 ++-----------
 5 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/src/Oracles/ArgsHash.hs b/src/Oracles/ArgsHash.hs
index d1ebc68..660edd9 100644
--- a/src/Oracles/ArgsHash.hs
+++ b/src/Oracles/ArgsHash.hs
@@ -5,7 +5,6 @@ import Base
 import Expression
 import Settings
 import Target
-import UserSettings
 
 newtype ArgsHashKey = ArgsHashKey Target
     deriving (Binary, Eq, Hashable, NFData, Show, Typeable)
@@ -21,7 +20,7 @@ newtype ArgsHashKey = ArgsHashKey Target
 -- argument list constructors are assumed not to examine target sources, but
 -- only append them to argument lists where appropriate.
 checkArgsHash :: Target -> Action ()
-checkArgsHash target = when trackBuildSystem $ do
+checkArgsHash target = do
     let hashed = [ show . hash $ inputs target ]
     _ <- askOracle . ArgsHashKey $ target { inputs = hashed } :: Action Int
     return ()
diff --git a/src/Rules/Generators/Common.hs b/src/Rules/Generators/Common.hs
index e97d536..b01ad2f 100644
--- a/src/Rules/Generators/Common.hs
+++ b/src/Rules/Generators/Common.hs
@@ -2,12 +2,10 @@ module Rules.Generators.Common (trackSource, yesNo, cppify) where
 
 import Base
 import Expression
-import UserSettings
 
--- | Track a given source file when constructing an expression if the user
--- enabled 'trackBuildSystem' in @hadrian/src/UserSettings.hs at .
+-- | Track a given source file when constructing an expression.
 trackSource :: FilePath -> Expr ()
-trackSource file = lift $ when trackBuildSystem $ need [ sourcePath -/- file ]
+trackSource file = lift $ need [ sourcePath -/- file ]
 
 -- | Turn a 'Bool' computed by an 'Action' into a 'String' expression returning
 -- "YES" (when the Boolean is 'True') or "NO" (when the Boolean is 'False').
diff --git a/src/Rules/Gmp.hs b/src/Rules/Gmp.hs
index efe9144..0cf5b91 100644
--- a/src/Rules/Gmp.hs
+++ b/src/Rules/Gmp.hs
@@ -34,7 +34,7 @@ gmpRules :: Rules ()
 gmpRules = do
     -- TODO: split into multiple rules
     gmpLibraryH %> \_ -> do
-        when trackBuildSystem $ need [sourcePath -/- "Rules/Gmp.hs"]
+        need [sourcePath -/- "Rules/Gmp.hs"]
         removeDirectory gmpBuildPath
 
         -- We don't use system GMP on Windows. TODO: fix?
diff --git a/src/Rules/Libffi.hs b/src/Rules/Libffi.hs
index 3ee3307..99b97df 100644
--- a/src/Rules/Libffi.hs
+++ b/src/Rules/Libffi.hs
@@ -58,7 +58,7 @@ configureEnvironment = do
 libffiRules :: Rules ()
 libffiRules = do
     libffiDependencies &%> \_ -> do
-        when trackBuildSystem $ need [sourcePath -/- "Rules/Libffi.hs"]
+        need [sourcePath -/- "Rules/Libffi.hs"]
         useSystemFfi <- flag UseSystemFfi
         if useSystemFfi
         then do
diff --git a/src/UserSettings.hs b/src/UserSettings.hs
index 1f73efa..a0a5d49 100644
--- a/src/UserSettings.hs
+++ b/src/UserSettings.hs
@@ -3,9 +3,8 @@
 -- If you don't copy the file your changes will be tracked by git and you can
 -- accidentally commit them.
 module UserSettings (
-    buildRootPath, userFlavours, userKnownPackages, integerLibrary,
-    trackBuildSystem, validating, turnWarningsIntoErrors, verboseCommands,
-    putBuild, putSuccess
+    buildRootPath, userFlavours, userKnownPackages, integerLibrary, validating,
+    turnWarningsIntoErrors, verboseCommands, putBuild, putSuccess
     ) where
 
 import System.Console.ANSI
@@ -42,14 +41,6 @@ integerLibrary = integerGmp
 -- * @Predicate@: a flag whose value can depend on the build environment and
 -- on the current build target.
 
--- TODO: Drop 'trackBuildSystem' as it brings negligible gains.
--- | Set this to True if you are making any changes in the build system and want
--- appropriate rebuilds to be initiated. Switching this to False speeds things
--- up a little (particularly zero builds).
--- WARNING: a complete rebuild is required when changing this setting.
-trackBuildSystem :: Bool
-trackBuildSystem = True
-
 -- TODO: This should be set automatically when validating.
 validating :: Bool
 validating = False



More information about the ghc-commits mailing list