import HeaderInfo
import DriverPhases
import SysTools
-import qualified SysTools
import HscMain
import Finder
import HscTypes
import Data.List ( isSuffixOf )
import Data.Maybe
import System.Exit
-import System.Cmd
import System.Environment
-- ---------------------------------------------------------------------------
-- ---------------------------------------------------------------------------
-- Link
-link :: GhcMode -- interactive or batch
+link :: GhcLink -- interactive or batch
-> DynFlags -- dynamic flags
-> Bool -- attempt linking in batch mode?
-> HomePackageTable -- what to link
-- will succeed.
#ifdef GHCI
-link Interactive dflags batch_attempt_linking hpt
+link LinkInMemory dflags batch_attempt_linking hpt
= do -- Not Linking...(demand linker will do the job)
return Succeeded
#endif
-link JustTypecheck dflags batch_attempt_linking hpt
+link NoLink dflags batch_attempt_linking hpt
= return Succeeded
-link BatchCompile dflags batch_attempt_linking hpt
+link LinkBinary dflags batch_attempt_linking hpt
| batch_attempt_linking
= do
let
-- Don't showPass in Batch mode; doLink will do that for us.
let link = case ghcLink dflags of
MkDLL -> doMkDLL
- StaticLink -> staticLink
+ LinkBinary -> staticLink
link dflags obj_files pkg_deps
debugTraceMsg dflags 3 (text "link: done")
| otherwise
= case ghcLink dflags of
NoLink -> return ()
- StaticLink -> staticLink dflags o_files link_pkgs
+ LinkBinary -> staticLink dflags o_files link_pkgs
MkDLL -> doMkDLL dflags o_files link_pkgs
where
-- Always link in the haskell98 package for static linking. Other
"",
"args: while ($a = shift(@ARGV)) {",
" if ( $a eq '+RTS' ) {",
- " $in_RTS_args = 1;",
+ " $in_RTS_args = 1;",
" } elsif ( $a eq '-RTS' ) {",
- " $in_RTS_args = 0;",
+ " $in_RTS_args = 0;",
" }",
" if ( $a eq '-d' && $in_RTS_args ) {",
- " $debug = '-';",
+ " $debug = '-';",
" } elsif ( $a =~ /^-qN(\\d+)/ && $in_RTS_args ) {",
- " $nprocessors = $1;",
+ " $nprocessors = $1;",
" } elsif ( $a =~ /^-qp(\\d+)/ && $in_RTS_args ) {",
- " $nprocessors = $1;",
+ " $nprocessors = $1;",
" } else {",
- " push(@nonPVM_args, $a);",
+ " push(@nonPVM_args, $a);",
" }",
"}",
"",