Index: ghc/compiler/main/DriverPipeline.hs
===================================================================
RCS file: /cvs/fptools/ghc/compiler/main/DriverPipeline.hs,v
retrieving revision 1.215
diff -u -5 -r1.215 DriverPipeline.hs
--- ghc/compiler/main/DriverPipeline.hs	9 Nov 2005 11:36:43 -0000	1.215
+++ ghc/compiler/main/DriverPipeline.hs	21 Nov 2005 21:25:22 -0000
@@ -328,11 +328,14 @@
 
 	debugTraceMsg dflags 1 (ptext SLIT("Linking") <+> text exe_file
 				 <+> text "...")
 
 	-- Don't showPass in Batch mode; doLink will do that for us.
-        staticLink dflags obj_files pkg_deps
+	let link = case ghcLink dflags of
+	        MkDLL       -> doMkDLL
+	        StaticLink  -> staticLink
+	link dflags obj_files pkg_deps
 
         debugTraceMsg dflags 3 (text "link: done")
 
 	-- staticLink only returns if it succeeds
         return Succeeded
Index: ghc/docs/users_guide/flags.xml
===================================================================
RCS file: /cvs/fptools/ghc/docs/users_guide/flags.xml,v
retrieving revision 1.20
diff -u -5 -r1.20 flags.xml
--- ghc/docs/users_guide/flags.xml	28 Oct 2005 15:51:15 -0000	1.20
+++ ghc/docs/users_guide/flags.xml	21 Nov 2005 21:25:25 -0000
@@ -171,16 +171,10 @@
 	      <entry><option>-M</option></entry>
 	      <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>.</entry>
 	      <entry>mode</entry>
 	      <entry>-</entry>
 	    </row>
-	    <row>
-	      <entry><option>--mk-dll</option></entry>
-	      <entry>DLL-creation mode (Windows only)</entry>
-	      <entry>dynamic</entry>
-	      <entry>-</entry>
-	    </row>
 	  </tbody>
 	</tgroup>
       </informaltable>
     </sect2>
 
@@ -1286,10 +1280,16 @@
 	      <entry>Set main function</entry>
 	      <entry>dynamic</entry>
 	      <entry>-</entry>
 	    </row>
 	    <row>
+	      <entry><option>--mk-dll</option></entry>
+	      <entry>DLL-creation mode (Windows only)</entry>
+	      <entry>dynamic</entry>
+	      <entry>-</entry>
+	    </row>
+	    <row>
 	      <entry><option>-no-hs-main</option></entry>
 	      <entry>Don't assume this program contains <literal>main</literal></entry>
 	      <entry>dynamic</entry>
 	      <entry>-</entry>
 	    </row>














