X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverPipeline.hs;h=716e06b772ab76e2814711d8ee8b4d3c13e2b10e;hb=9bcd95bad83ee937c178970e8b729732e680fe1e;hp=3cad7407810cdd87febf0ffcd62fe714836034fe;hpb=9898358f3743548d00e55b26ab6784cadc2d6807;p=ghc-hetmet.git diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 3cad740..716e06b 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