Commit 3d411991 authored by Duncan Coutts's avatar Duncan Coutts
Browse files

Remove old Windows-only implementation of keeping main outside the rts

We now do it for all ways and for all platforms. This was a Windows-only
version that only kept a separate Main.dyn_o for the dynamic linking case.
It had to do that because Windows DLLs are stricter about unresolved symbols
where as for ELF platforms we only run into the problem when we're not using
a Haskell main function.
parent 11d4f686
......@@ -1394,12 +1394,6 @@ linkBinary dflags o_files dep_packages = do
let frameworks = cmdlineFrameworks dflags
framework_opts = concat [ ["-framework", fw] | fw <- reverse frameworks ]
-- reverse because they're added in reverse order from the cmd line
#ifdef mingw32_TARGET_OS
let dynMain = if not opt_Static then
(head (libraryDirs (getPackageDetails (pkgState dflags) rtsPackageId))) ++ "/Main.dyn_o"
-- probably _stub.o files
extra_ld_inputs <- readIORef v_Ld_inputs
......@@ -1442,9 +1436,6 @@ linkBinary dflags o_files dep_packages = do
++ map SysTools.Option (
++ o_files
#ifdef mingw32_TARGET_OS
++ [dynMain]
++ extra_ld_inputs
++ lib_path_opts
++ extra_ld_opts
Supports Markdown
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