diff options
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | hadrian/src/Rules/Libffi.hs | 22 |
2 files changed, 10 insertions, 14 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 76ce870b45..f9b2a42872 100644 --- a/.gitlab-ci.yml +++ b/.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 diff --git a/hadrian/src/Rules/Libffi.hs b/hadrian/src/Rules/Libffi.hs index 9a251c0ebe..a1a53741db 100644 --- a/hadrian/src/Rules/Libffi.hs +++ b/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." |