Commit 8aaa9ef4 authored by Duncan Coutts's avatar Duncan Coutts

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.
parent 4e340bbb
......@@ -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) $
......
Markdown is supported
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