[commit: ghc] wip/nfs-locking: Move RTS-specific paths to Settings.Packages.Rts (f0fb1be)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 01:24:34 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/f0fb1be5d3c234d40314f4743d1e45f0d891718e/ghc
>---------------------------------------------------------------
commit f0fb1be5d3c234d40314f4743d1e45f0d891718e
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Fri Aug 18 02:46:30 2017 +0100
Move RTS-specific paths to Settings.Packages.Rts
>---------------------------------------------------------------
f0fb1be5d3c234d40314f4743d1e45f0d891718e
src/GHC.hs | 16 ----------------
src/Rules/Data.hs | 1 +
src/Rules/Generate.hs | 1 +
src/Rules/Program.hs | 1 +
src/Settings/Packages/Rts.hs | 17 ++++++++++++++++-
5 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/src/GHC.hs b/src/GHC.hs
index 13142bd..0b3d035 100644
--- a/src/GHC.hs
+++ b/src/GHC.hs
@@ -13,9 +13,6 @@ module GHC (
-- * Package information
builderProvenance, programName, nonCabalContext, nonHsMainPackage, autogenPath,
- -- * RTS library
- rtsContext, rtsBuildPath, rtsConfIn,
-
-- * Miscellaneous
systemBuilderPath, ghcSplitPath, stripCmdPath, inplaceInstallPath, buildDll0
) where
@@ -239,19 +236,6 @@ stripCmdPath = do
return ":" -- HACK: from the make-based system, see the ref above
_ -> return "strip"
--- TODO: Move to RTS-specific package?
--- | RTS is considered a Stage1 package. This determines RTS build directory.
-rtsContext :: Context
-rtsContext = vanillaContext Stage1 rts
-
--- | Path to the RTS build directory.
-rtsBuildPath :: Action FilePath
-rtsBuildPath = buildPath rtsContext
-
--- | Path to RTS package configuration file, to be processed by HsCpp.
-rtsConfIn :: FilePath
-rtsConfIn = pkgPath rts -/- "package.conf.in"
-
buildDll0 :: Context -> Action Bool
buildDll0 Context {..} = do
windows <- windowsHost
diff --git a/src/Rules/Data.hs b/src/Rules/Data.hs
index 975f3fa..ef2f017 100644
--- a/src/Rules/Data.hs
+++ b/src/Rules/Data.hs
@@ -6,6 +6,7 @@ import Expression
import GHC
import Oracles.Setting
import Rules.Generate
+import Settings.Packages.Rts
import Target
import Utilities
diff --git a/src/Rules/Generate.hs b/src/Rules/Generate.hs
index 0057bf8..e5dffcc 100644
--- a/src/Rules/Generate.hs
+++ b/src/Rules/Generate.hs
@@ -14,6 +14,7 @@ import Oracles.Setting
import Rules.Gmp
import Rules.Libffi
import Settings
+import Settings.Packages.Rts
import Target
import Utilities
diff --git a/src/Rules/Program.hs b/src/Rules/Program.hs
index c88ddd8..efdd7f4 100644
--- a/src/Rules/Program.hs
+++ b/src/Rules/Program.hs
@@ -11,6 +11,7 @@ import Oracles.PackageData
import Oracles.Setting
import Rules.Wrappers
import Settings
+import Settings.Packages.Rts
import Target
import Utilities
diff --git a/src/Settings/Packages/Rts.hs b/src/Settings/Packages/Rts.hs
index fe490dd..0ae764f 100644
--- a/src/Settings/Packages/Rts.hs
+++ b/src/Settings/Packages/Rts.hs
@@ -1,12 +1,27 @@
-module Settings.Packages.Rts (rtsPackageArgs, rtsLibffiLibrary) where
+module Settings.Packages.Rts (
+ rtsContext, rtsBuildPath, rtsConfIn, rtsPackageArgs, rtsLibffiLibrary
+ ) where
import Base
+import Context (buildPath)
import Expression
import GHC
import Oracles.Flag
import Oracles.Setting
import Settings
+-- | RTS is considered a Stage1 package. This determines RTS build directory.
+rtsContext :: Context
+rtsContext = vanillaContext Stage1 rts
+
+-- | Path to the RTS build directory.
+rtsBuildPath :: Action FilePath
+rtsBuildPath = buildPath rtsContext
+
+-- | Path to RTS package configuration file, to be processed by HsCpp.
+rtsConfIn :: FilePath
+rtsConfIn = pkgPath rts -/- "package.conf.in"
+
rtsLibffiLibraryName :: Action FilePath
rtsLibffiLibraryName = do
useSystemFfi <- flag UseSystemFfi
More information about the ghc-commits
mailing list