Commit 2647ab17 authored by y.zhuang5@lse.ac.uk's avatar y.zhuang5@lse.ac.uk
Browse files

enable LinkDynLib in compilier phase

parent 29eb3f7c
......@@ -296,6 +296,24 @@ link NoLink _ _ _
= return Succeeded
link LinkBinary dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
link LinkDynLib dflags batch_attempt_linking hpt
= link' dflags batch_attempt_linking hpt
-- warning suppression
link other _ _ _ = panicBadLink other
panicBadLink :: GhcLink -> a
panicBadLink other = panic ("link: GHC not built to link this way: " ++
show other)
link' :: DynFlags -- dynamic flags
-> Bool -- attempt linking in batch mode?
-> HomePackageTable -- what to link
-> IO SuccessFlag
link' dflags batch_attempt_linking hpt
| batch_attempt_linking
= do
let
......@@ -347,13 +365,6 @@ link LinkBinary dflags batch_attempt_linking hpt
text " Main.main not exported; not linking.")
return Succeeded
-- warning suppression
link other _ _ _ = panicBadLink other
panicBadLink :: GhcLink -> a
panicBadLink other = panic ("link: GHC not built to link this way: " ++
show other)
linkingNeeded :: DynFlags -> [Linkable] -> [PackageId] -> IO Bool
linkingNeeded dflags linkables pkg_deps = do
......
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