X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDriverPipeline.hs;h=45064beb5827fc9145beaebc8319db8ac610a449;hb=e4c80bf2a68cb50fa51a6a3f81d0bb9cd8f22c8b;hp=fba4afb911ab2f5c53e4886e2306bbd63200fe64;hpb=29b3388fc5773aa1755345c25acf7c561b924df0;p=ghc-hetmet.git diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index fba4afb..45064be 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -250,7 +250,7 @@ compileStub dflags mod location = do -- --------------------------------------------------------------------------- -- Link -link :: GhcMode -- interactive or batch +link :: GhcLink -- interactive or batch -> DynFlags -- dynamic flags -> Bool -- attempt linking in batch mode? -> HomePackageTable -- what to link @@ -264,15 +264,15 @@ link :: GhcMode -- interactive or batch -- 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 @@ -317,7 +317,7 @@ link BatchCompile dflags batch_attempt_linking hpt -- 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") @@ -377,7 +377,7 @@ doLink dflags stop_phase o_files | 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 @@ -1066,9 +1066,9 @@ runPhase_MoveBinary dflags input_fn pvm_executable_base = "=" ++ input_fn pvm_executable = pvm_root ++ "/bin/" ++ pvm_arch ++ "/" ++ pvm_executable_base -- nuke old binary; maybe use configur'ed names for cp and rm? - system ("rm -f " ++ pvm_executable) + Panic.try (removeFile pvm_executable) -- move the newly created binary into PVM land - system ("cp -p " ++ input_fn ++ " " ++ pvm_executable) + copy dflags "copying PVM executable" input_fn pvm_executable -- generate a wrapper script for running a parallel prg under PVM writeFile input_fn (mk_pvm_wrapper_script pvm_executable pvm_executable_base sysMan) return True @@ -1106,18 +1106,18 @@ mk_pvm_wrapper_script pvm_executable pvm_executable_base sysMan = unlines $ "", "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);", " }", "}", "",