summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2013-05-14 16:41:05 +0100
committerIan Lynagh <ian@well-typed.com>2013-05-14 16:41:05 +0100
commit69a343af10f70fcc5a7977968cbceac55114c2ee (patch)
tree7342648e8755d141db435aac56be6afc1a274de1 /compiler/main
parentbb2795db36b36966697c228315ae20767c4a8753 (diff)
downloadhaskell-69a343af10f70fcc5a7977968cbceac55114c2ee.tar.gz
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).
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/HscTypes.lhs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs
index d9fe88bb80..28134e1545 100644
--- a/compiler/main/HscTypes.lhs
+++ b/compiler/main/HscTypes.lhs
@@ -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