[Git][ghc/ghc][master] Hadrian: always generate the libffi dynlibs manifest with globbing
Marge Bot
gitlab at gitlab.haskell.org
Thu May 30 11:28:37 UTC 2019
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
3aa71a22 by Alp Mestanogullari at 2019-05-30T11:28:32Z
Hadrian: always generate the libffi dynlibs manifest with globbing
Instead of trying to deduce which dynlibs are expected to be found (and then
copied to the RTS's build dir) in libffi's build directory, with some OS
specific logic, we now always just use `getDirectoryFilesIO` to look for
those dynlibs and record their names in the manifest. The previous logic
ended up causing problems on Windows, where we don't build dynlibs at all
for now but the manifest file's logic didn't take that into account because
it was only partially reproducing the criterions that determine whether or not
we will be building shared libraries.
This patch also re-enables the Hadrian/Windows CI job, which was failing to
build GHC precisely because of libffi shared libraries and the aforementionned
duplicated logic.
- - - - -
2 changed files:
- .gitlab-ci.yml
- hadrian/src/Rules/Libffi.hs
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -577,7 +577,7 @@ validate-x86_64-linux-fedora27:
paths:
- ghc.tar.xz
-.validate-x86_64-windows-hadrian:
+validate-x86_64-windows-hadrian:
extends: .build-windows-hadrian
variables:
MSYSTEM: MINGW64
=====================================
hadrian/src/Rules/Libffi.hs
=====================================
@@ -171,19 +171,15 @@ libffiRules = do
dynLibFiles <- do
windows <- windowsHost
osx <- osxHost
- let libffiName'' = libffiName' windows True
- if windows
- then
- let libffiDll = "lib" ++ libffiName'' ++ ".dll"
- in return [libffiPath -/- "inst/bin" -/- libffiDll]
- else do
- let libffiLibPath = libffiPath -/- "inst/lib"
- dynLibsRelative <- liftIO $ getDirectoryFilesIO
- libffiLibPath
- (if osx
- then ["lib" ++ libffiName'' ++ ".dylib*"]
- else ["lib" ++ libffiName'' ++ ".so*"])
- return (fmap (libffiLibPath -/-) dynLibsRelative)
+ let libfilesDir = libffiPath -/-
+ (if windows then "inst" -/- "bin" else "inst" -/- "lib")
+ libffiName'' = libffiName' windows True
+ dynlibext
+ | windows = "dll"
+ | osx = "dylib"
+ | otherwise = "so"
+ filepat = "lib" ++ libffiName'' ++ "*." ++ dynlibext ++ "*"
+ liftIO $ getDirectoryFilesIO "." [libfilesDir -/- filepat]
writeFileLines dynLibMan dynLibFiles
putSuccess "| Successfully build libffi."
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/3aa71a222ac2e5538db15ec8facb7f0253782647
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/3aa71a222ac2e5538db15ec8facb7f0253782647
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190530/2f5ef44c/attachment-0001.html>
More information about the ghc-commits
mailing list