[commit: ghc] wip/nfs-locking: change from using "dirs" to "dir" for FFI library configuration (a3afd03)
git at git.haskell.org
git at git.haskell.org
Thu Oct 26 23:54:17 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nfs-locking
Link : http://ghc.haskell.org/trac/ghc/changeset/a3afd03cf3b46e3344c3274606a3d42b1b08a254/ghc
>---------------------------------------------------------------
commit a3afd03cf3b46e3344c3274606a3d42b1b08a254
Author: Karel Gardas <karel.gardas at centrum.cz>
Date: Mon Jan 18 10:24:42 2016 +0100
change from using "dirs" to "dir" for FFI library configuration
>---------------------------------------------------------------
a3afd03cf3b46e3344c3274606a3d42b1b08a254
cfg/system.config.in | 4 ++--
src/Oracles/Config/Setting.hs | 8 ++++----
src/Rules/Libffi.hs | 3 +--
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/cfg/system.config.in b/cfg/system.config.in
index ecbf18d..94058df 100644
--- a/cfg/system.config.in
+++ b/cfg/system.config.in
@@ -128,8 +128,8 @@ gmp-include-dirs = @GMP_INCLUDE_DIRS@
gmp-lib-dirs = @GMP_LIB_DIRS@
use-system-ffi = @UseSystemLibFFI@
-ffi-include-dirs = @FFIIncludeDir@
-ffi-lib-dirs = @FFILibDir@
+ffi-include-dir = @FFIIncludeDir@
+ffi-lib-dir = @FFILibDir@
# Optional Dependencies:
#=======================
diff --git a/src/Oracles/Config/Setting.hs b/src/Oracles/Config/Setting.hs
index 56ef1ca..f4540cc 100644
--- a/src/Oracles/Config/Setting.hs
+++ b/src/Oracles/Config/Setting.hs
@@ -47,6 +47,8 @@ data Setting = BuildArch
| TargetPlatform
| TargetPlatformFull
| TargetVendor
+ | FfiIncludeDir
+ | FfiLibDir
data SettingList = ConfCcArgs Stage
| ConfCppArgs Stage
@@ -57,8 +59,6 @@ data SettingList = ConfCcArgs Stage
| HsCppArgs
| IconvIncludeDirs
| IconvLibDirs
- | FfiIncludeDirs
- | FfiLibDirs
setting :: Setting -> Action String
setting key = askConfig $ case key of
@@ -90,6 +90,8 @@ setting key = askConfig $ case key of
TargetPlatform -> "target-platform"
TargetPlatformFull -> "target-platform-full"
TargetVendor -> "target-vendor"
+ FfiIncludeDir -> "ffi-include-dir"
+ FfiLibDir -> "ffi-lib-dir"
settingList :: SettingList -> Action [String]
settingList key = fmap words $ askConfig $ case key of
@@ -102,8 +104,6 @@ settingList key = fmap words $ askConfig $ case key of
HsCppArgs -> "hs-cpp-args"
IconvIncludeDirs -> "iconv-include-dirs"
IconvLibDirs -> "iconv-lib-dirs"
- FfiIncludeDirs -> "ffi-include-dirs"
- FfiLibDirs -> "ffi-lib-dirs"
getSetting :: Setting -> ReaderT a Action String
getSetting = lift . setting
diff --git a/src/Rules/Libffi.hs b/src/Rules/Libffi.hs
index fea58ab..518389e 100644
--- a/src/Rules/Libffi.hs
+++ b/src/Rules/Libffi.hs
@@ -70,12 +70,11 @@ configureArguments = do
libffiRules :: Rules ()
libffiRules = do
libffiDependencies &%> \_ -> do
- ffi_header_dirs <- settingList FfiIncludeDirs
+ ffi_header_dir <- setting FfiIncludeDir
use_system_ffi <- flag UseSystemFfi
if use_system_ffi
then do
putBuild "| System supplied FFI library will be used"
- let ffi_header_dir = head ffi_header_dirs
forM_ ["ffi.h", "ffitarget.h"] $ \file -> do
let src = ffi_header_dir -/- file
copyFile src (rtsBuildPath -/- file)
More information about the ghc-commits
mailing list