summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Fruhwirth <clemens@endorphin.org>2008-10-13 20:14:26 +0000
committerClemens Fruhwirth <clemens@endorphin.org>2008-10-13 20:14:26 +0000
commitc7b676957a65e54bc3d5722f04468658df7704e3 (patch)
treedfa9a243bf51cc3b8a57a8e8a5ab48c5251f472a
parentc7a16a2ced9ad01183ab27ce517a517e31a71436 (diff)
downloadhaskell-c7b676957a65e54bc3d5722f04468658df7704e3.tar.gz
Do not filter the rts from linked libraries in linkDynLib as Windows does not allow unresolved symbols
-rw-r--r--compiler/main/DriverPipeline.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 3cad740781..716e06b772 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1494,8 +1494,14 @@ linkDynLib dflags o_files dep_packages = do
-- because the RTS lib comes in several flavours and we want to be
-- able to pick the flavour when a binary is linked.
pkgs <- getPreloadPackagesAnd dflags dep_packages
- let pkgs_no_rts = filter ((/= rtsPackageId) . packageConfigId) pkgs
+ -- On Windows we need to link the RTS import lib as Windows does
+ -- not allow undefined symbols.
+#if defined(mingw32_HOST_OS)
+ let pkgs_no_rts = filter ((/= rtsPackageId) . packageConfigId) pkgs
+#else
+ let pkgs_no_rts = pkgs
+#endif
let pkg_lib_paths = collectLibraryPaths pkgs_no_rts
let pkg_lib_path_opts = map ("-L"++) pkg_lib_paths