[project @ 2005-11-23 11:32:53 by simonmar]
authorsimonmar <unknown>
Wed, 23 Nov 2005 11:32:53 +0000 (11:32 +0000)
committersimonmar <unknown>
Wed, 23 Nov 2005 11:32:53 +0000 (11:32 +0000)
make --mk-dll work with --make

Submitted by: Esa Ilari Vuokko <eivuokko@gmail.com>, thanks!

ghc/compiler/main/DriverPipeline.hs
ghc/docs/users_guide/flags.xml

index 633561a..85099e8 100644 (file)
@@ -330,7 +330,10 @@ link BatchCompile dflags batch_attempt_linking hpt
                                 <+> 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")
 
index a6c4d12..8406184 100644 (file)
              <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>
              <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>