[commit: ghc] wip/nfs-locking: Track gmpBuildInfoPath explicitly. (2c21908)
git at git.haskell.org
git at git.haskell.org
Fri Oct 27 00:19:34 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/2c219087e3f7ec91e7ab02edbfd3466818402c73/ghc
>---------------------------------------------------------------
commit 2c219087e3f7ec91e7ab02edbfd3466818402c73
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date: Thu Feb 11 11:40:42 2016 +0000
Track gmpBuildInfoPath explicitly.
See #159.
>---------------------------------------------------------------
2c219087e3f7ec91e7ab02edbfd3466818402c73
src/Rules/Gmp.hs | 4 +++-
src/Settings/Builders/Ghc.hs | 5 +----
src/Settings/Paths.hs | 8 ++++++--
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/Rules/Gmp.hs b/src/Rules/Gmp.hs
index 9916ad6..b70b840 100644
--- a/src/Rules/Gmp.hs
+++ b/src/Rules/Gmp.hs
@@ -119,4 +119,6 @@ gmpRules = do
gmpLibraryInTreeH %> \_ -> need [gmpLibraryH]
- gmpBase -/- "config.mk" %> \_ -> need [pkgDataFile Stage1 integerGmp]
+ -- This causes integerGmp package to be configured, hence creating the files
+ [gmpBase -/- "config.mk", gmpBuildInfoPath] &%> \_ ->
+ need [pkgDataFile Stage1 integerGmp]
diff --git a/src/Settings/Builders/Ghc.hs b/src/Settings/Builders/Ghc.hs
index b7aef56..51fde7f 100644
--- a/src/Settings/Builders/Ghc.hs
+++ b/src/Settings/Builders/Ghc.hs
@@ -12,9 +12,6 @@ import Settings
import Settings.Builders.GhcCabal (bootPackageDbArgs)
import Settings.Builders.Common (cIncludeArgs)
-buildInfoPath :: FilePath
-buildInfoPath = pkgPath integerGmp -/- "integer-gmp.buildinfo"
-
-- TODO: add support for -dyno
-- $1/$2/build/%.$$($3_o-bootsuf) : $1/$4/%.hs-boot
-- $$(call cmd,$1_$2_HC) $$($1_$2_$3_ALL_HC_OPTS) -c $$< -o $$@
@@ -32,7 +29,7 @@ ghcBuilderArgs = stagedBuilder Ghc ? do
libs <- getPkgDataList DepExtraLibs
gmpLibs <- if stage > Stage0 && buildProg
then do -- TODO: get this data more gracefully
- buildInfo <- lift $ readFileLines buildInfoPath
+ buildInfo <- lift $ readFileLines gmpBuildInfoPath
let extract s = case stripPrefix "extra-libraries: " s of
Nothing -> []
Just value -> words value
diff --git a/src/Settings/Paths.hs b/src/Settings/Paths.hs
index 99a4962..96cd3bf 100644
--- a/src/Settings/Paths.hs
+++ b/src/Settings/Paths.hs
@@ -1,7 +1,7 @@
module Settings.Paths (
targetDirectory, targetPath, pkgDataFile, pkgHaddockFile, pkgLibraryFile,
- pkgLibraryFile0, pkgGhciLibraryFile, gmpBuildPath, packageDbDirectory,
- pkgConfFile
+ pkgLibraryFile0, pkgGhciLibraryFile, gmpBuildPath, gmpBuildInfoPath,
+ packageDbDirectory, pkgConfFile
) where
import Base
@@ -51,6 +51,10 @@ pkgFile stage pkg prefix suffix = do
gmpBuildPath :: FilePath
gmpBuildPath = buildRootPath -/- "stage1/gmp"
+-- We extract system gmp library name from this file
+gmpBuildInfoPath :: FilePath
+gmpBuildInfoPath = pkgPath integerGmp -/- "integer-gmp.buildinfo"
+
-- TODO: move to buildRootPath, see #113
-- StageN, N > 0, share the same packageDbDirectory
packageDbDirectory :: Stage -> FilePath
More information about the ghc-commits
mailing list