Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
19310e7f
Commit
19310e7f
authored
Jan 04, 2016
by
Andrey Mokhov
Browse files
Fix libCffi name on Windows (fix
#89
).
parent
64f93509
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Rules/Copy.hs
View file @
19310e7f
...
...
@@ -6,6 +6,7 @@ import GHC
import
Rules.Actions
import
Rules.Generate
import
Rules.Libffi
import
Settings.Packages.Rts
import
Settings.TargetDirectory
installTargets
::
[
FilePath
]
...
...
@@ -23,7 +24,8 @@ copyRules = do
++
"(found: "
++
show
ffiHPaths
++
")."
copyFile
(
takeDirectory
(
head
ffiHPaths
)
-/-
takeFileName
ffih
)
ffih
copyFile
libffiLibrary
(
targetPath
Stage1
rts
-/-
"build"
-/-
"libCffi.a"
)
libffiName
<-
rtsLibffiLibraryName
copyFile
libffiLibrary
(
targetPath
Stage1
rts
-/-
"build/lib"
++
libffiName
<.>
"a"
)
"inplace/lib/template-hsc.h"
<~
pkgPath
hsc2hs
"inplace/lib/platformConstants"
<~
derivedConstantsPath
...
...
src/Settings/Packages/Rts.hs
View file @
19310e7f
module
Settings.Packages.Rts
(
rtsPackageArgs
,
rtsConfIn
,
rtsConf
)
where
module
Settings.Packages.Rts
(
rtsPackageArgs
,
rtsConfIn
,
rtsConf
,
rtsLibffiLibraryName
)
where
import
Base
import
Expression
...
...
@@ -15,6 +17,11 @@ rtsConfIn = pkgPath rts -/- "package.conf.in"
rtsConf
::
FilePath
rtsConf
=
targetPath
Stage1
rts
-/-
"package.conf.inplace"
rtsLibffiLibraryName
::
Action
FilePath
rtsLibffiLibraryName
=
do
windows
<-
windowsHost
return
$
if
windows
then
"Cffi-6"
else
"Cffi"
rtsPackageArgs
::
Args
rtsPackageArgs
=
package
rts
?
do
let
yesNo
=
lift
.
fmap
(
\
x
->
if
x
then
"YES"
else
"NO"
)
...
...
@@ -36,8 +43,7 @@ rtsPackageArgs = package rts ? do
way
<-
getWay
path
<-
getTargetPath
top
<-
getSetting
GhcSourcePath
windows
<-
lift
$
windowsHost
let
libffiName
=
if
windows
then
"ffi-6"
else
"ffi"
libffiName
<-
lift
$
rtsLibffiLibraryName
mconcat
[
builderGcc
?
mconcat
[
arg
"-Irts"
...
...
@@ -74,7 +80,7 @@ rtsPackageArgs = package rts ? do
[
arg
(
"-DTOP="
++
quote
top
)
,
arg
"-DFFI_INCLUDE_DIR="
,
arg
"-DFFI_LIB_DIR="
,
arg
$
"-DFFI_LIB="
++
quote
(
"C"
++
libffiName
)
]
]
,
arg
$
"-DFFI_LIB="
++
quote
libffiName
]
]
-- #-----------------------------------------------------------------------------
-- # Use system provided libffi
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment