summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2009-05-19 12:11:49 +0000
committerDuncan Coutts <duncan@well-typed.com>2009-05-19 12:11:49 +0000
commit8aaa9ef471cadbc79fca58b234b198065f650dcf (patch)
tree1e377af54cc097aec7ab14094c49d415c338c7a0 /compiler
parent4e340bbb54087a3a5b12afc6e2ad3664ec4beed3 (diff)
downloadhaskell-8aaa9ef471cadbc79fca58b234b198065f650dcf.tar.gz
When linking a shared library with --make, always do the link step
Without -shared, the default target is a binary and in that case it makes sense for --make to not try and link a binary when there is no Main module. But for a shared library the user already has to specify -shared and there's no reason a shared lib should contain any Main module or main function.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/GHC.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/main/GHC.hs b/compiler/main/GHC.hs
index c5571cbd9f..f63b98f124 100644
--- a/compiler/main/GHC.hs
+++ b/compiler/main/GHC.hs
@@ -888,7 +888,7 @@ load2 how_much mod_graph = do
let
main_mod = mainModIs dflags
a_root_is_Main = any ((==main_mod).ms_mod) mod_graph
- do_linking = a_root_is_Main || no_hs_main
+ do_linking = a_root_is_Main || no_hs_main || not StaticFlags.opt_Static
when (ghcLink dflags == LinkBinary
&& isJust ofile && not do_linking) $