[commit: ghc] wip/nfs-locking: Move RTS path settings to Settings.Path (46ef16f)

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


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

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

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

commit 46ef16f18f752ad2df2c92fafdf5c208a4589e2c
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Nov 27 11:42:25 2016 +0000

    Move RTS path settings to Settings.Path


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

46ef16f18f752ad2df2c92fafdf5c208a4589e2c
 src/Rules.hs                 |  1 -
 src/Rules/Data.hs            |  1 -
 src/Rules/Generate.hs        |  1 -
 src/Settings/Packages/Rts.hs | 14 +-------------
 src/Settings/Path.hs         | 10 +++++++++-
 5 files changed, 10 insertions(+), 17 deletions(-)

diff --git a/src/Rules.hs b/src/Rules.hs
index 506fe2c..832bf4c 100644
--- a/src/Rules.hs
+++ b/src/Rules.hs
@@ -19,7 +19,6 @@ import qualified Rules.Perl
 import qualified Rules.Program
 import qualified Rules.Register
 import Settings
-import Settings.Packages.Rts
 import Settings.Path
 
 allStages :: [Stage]
diff --git a/src/Rules/Data.hs b/src/Rules/Data.hs
index 1314cc4..5c8a63b 100644
--- a/src/Rules/Data.hs
+++ b/src/Rules/Data.hs
@@ -9,7 +9,6 @@ import Oracles.Dependencies
 import Oracles.Path
 import Rules.Generate
 import Rules.Libffi
-import Settings.Packages.Rts
 import Settings.Path
 import Target
 import UserSettings
diff --git a/src/Rules/Generate.hs b/src/Rules/Generate.hs
index e84313a..5d557b4 100644
--- a/src/Rules/Generate.hs
+++ b/src/Rules/Generate.hs
@@ -17,7 +17,6 @@ import Rules.Generators.GhcSplit
 import Rules.Generators.GhcVersionH
 import Rules.Generators.VersionHs
 import Rules.Libffi
-import Settings.Packages.Rts
 import Settings.Path
 import Target
 import UserSettings
diff --git a/src/Settings/Packages/Rts.hs b/src/Settings/Packages/Rts.hs
index e7c3a60..d10c6f0 100644
--- a/src/Settings/Packages/Rts.hs
+++ b/src/Settings/Packages/Rts.hs
@@ -1,6 +1,4 @@
-module Settings.Packages.Rts (
-    rtsPackageArgs, rtsConfIn, rtsConf, rtsContext, rtsLibffiLibraryName
-    ) where
+module Settings.Packages.Rts (rtsPackageArgs, rtsLibffiLibraryName) where
 
 import Base
 import GHC
@@ -9,16 +7,6 @@ import Oracles.Config.Setting
 import Oracles.Path
 import Predicate
 import Settings
-import Settings.Path
-
-rtsContext :: Context
-rtsContext = vanillaContext Stage1 rts
-
-rtsConfIn :: FilePath
-rtsConfIn = pkgPath rts -/- "package.conf.in"
-
-rtsConf :: FilePath
-rtsConf = pkgInplaceConfig rtsContext
 
 rtsLibffiLibraryName :: Action FilePath
 rtsLibffiLibraryName = do
diff --git a/src/Settings/Path.hs b/src/Settings/Path.hs
index 934a0ec..8999300 100644
--- a/src/Settings/Path.hs
+++ b/src/Settings/Path.hs
@@ -4,7 +4,7 @@ module Settings.Path (
     gmpBuildInfoPath, generatedPath, libffiBuildPath, shakeFilesPath,
     pkgConfFile, packageDbDirectory, packageDbStamp, bootPackageConstraints,
     packageDependencies, objectPath, programInplacePath, programInplaceLibPath,
-    installPath, autogenPath, pkgInplaceConfig
+    installPath, autogenPath, pkgInplaceConfig, rtsContext, rtsConfIn
     ) where
 
 import Base
@@ -100,6 +100,14 @@ pkgFile context prefix suffix = do
     componentId <- pkgData $ ComponentId path
     return $ path -/- prefix ++ componentId ++ suffix
 
+-- | RTS is considered a Stage1 package. This determines RTS build path.
+rtsContext :: Context
+rtsContext = vanillaContext Stage1 rts
+
+-- | Path to RTS package configuration file, to be processed by HsCpp.
+rtsConfIn :: FilePath
+rtsConfIn = pkgPath rts -/- "package.conf.in"
+
 -- | Build directory for in-tree GMP library.
 gmpBuildPath :: FilePath
 gmpBuildPath = buildRootPath -/- "stage1/gmp"



More information about the ghc-commits mailing list