Commit 69a343af authored by ian@well-typed.com's avatar ian@well-typed.com

Fix ghci on Windows when GHC is dynamically linked

On Windows, we need to prepend "lib" to Haskell DLLs.
(maybe we should be naming the DLLs without the prefix instead? But this
works for now).
parent bb2795db
......@@ -1195,7 +1195,7 @@ locateLib dflags is_hs dirs lib
mk_arch_path dir = dir </> ("lib" ++ lib <.> "a")
hs_dyn_lib_name = lib ++ "-ghc" ++ cProjectVersion
mk_hs_dyn_lib_path dir = dir </> mkSOName platform hs_dyn_lib_name
mk_hs_dyn_lib_path dir = dir </> mkHsSOName platform hs_dyn_lib_name
so_name = mkSOName platform lib
mk_dyn_lib_path dir = dir </> so_name
......
......@@ -37,7 +37,7 @@ module HscTypes (
PackageInstEnv, PackageRuleBase,
mkSOName, soExt,
mkSOName, mkHsSOName, soExt,
-- * Annotations
prepareAnnotations,
......@@ -1796,6 +1796,9 @@ mkSOName platform root
OSMinGW32 -> root <.> "dll"
_ -> ("lib" ++ root) <.> "so"
mkHsSOName :: Platform -> FilePath -> FilePath
mkHsSOName platform root = ("lib" ++ root) <.> soExt platform
soExt :: Platform -> FilePath
soExt platform
= case platformOS platform of
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment