[project @ 2001-08-16 14:43:59 by rrt]
authorrrt <unknown>
Thu, 16 Aug 2001 14:43:59 +0000 (14:43 +0000)
committerrrt <unknown>
Thu, 16 Aug 2001 14:43:59 +0000 (14:43 +0000)
Update ILX tool functions to use Option and OptionFile

ghc/compiler/main/DriverPipeline.hs
ghc/compiler/main/SysTools.lhs

index 2f06714..e0dc7ee 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: DriverPipeline.hs,v 1.99 2001/08/15 13:27:43 sewardj Exp $
+-- $Id: DriverPipeline.hs,v 1.100 2001/08/16 14:43:59 rrt Exp $
 --
 -- GHC Driver
 --
@@ -693,9 +693,12 @@ run_phase SplitAs basename _suff _input_fn output_fn
 
 run_phase Ilx2Il _basename _suff input_fn output_fn
   = do ilx2il_opts <- getOpts opt_I
-        SysTools.runIlx2il (ilx2il_opts
-                           ++ [ "--no-add-suffix-to-assembly", "mscorlib",
-                               "-o", output_fn, input_fn ])
+        SysTools.runIlx2il (map SysTools.Option ilx2il_opts
+                           ++ [ SysTools.Option "--no-add-suffix-to-assembly",
+                               SysTools.Option "mscorlib",
+                               SysTools.Option "-o",
+                               SysTools.FileOption output_fn,
+                               SysTools.FileOption input_fn ])
        return (Just output_fn)
 
 -----------------------------------------------------------------------------
@@ -704,8 +707,11 @@ run_phase Ilx2Il _basename _suff input_fn output_fn
 
 run_phase Ilasm _basename _suff input_fn output_fn
   = do ilasm_opts <- getOpts opt_i
-        SysTools.runIlasm (ilasm_opts
-                          ++ [ "/QUIET", "/DLL", "/OUT="++output_fn, input_fn ])
+        SysTools.runIlasm (map SysTools.Option ilasm_opts
+                          ++ [ SysTools.Option "/QUIET",
+                               SysTools.Option "/DLL",
+                               SysTools.Option ("/OUT="++output_fn),
+                               SysTools.FileOption input_fn ])
        return (Just output_fn)
 
 #endif -- ILX
index 56dd3fc..fdda9dd 100644 (file)
@@ -1,5 +1,5 @@
 -----------------------------------------------------------------------------
--- $Id: SysTools.lhs,v 1.52 2001/08/15 15:02:04 rrt Exp $
+-- $Id: SysTools.lhs,v 1.53 2001/08/16 14:43:59 rrt Exp $
 --
 -- (c) The University of Glasgow 2001
 --
@@ -495,11 +495,11 @@ runLink args = do p <- readIORef v_Pgm_l
                  runSomething "Linker" p args
 
 #ifdef ILX
-runIlx2il :: [String] -> IO ()
+runIlx2il :: [Option] -> IO ()
 runIlx2il args = do p <- readIORef v_Pgm_I
                    runSomething "Ilx2Il" p args
 
-runIlasm :: [String] -> IO ()
+runIlasm :: [Option] -> IO ()
 runIlasm args = do p <- readIORef v_Pgm_i
                   runSomething "Ilasm" p args
 #endif
@@ -720,11 +720,6 @@ unDosifyPath xs = subst '\\' '/' xs
 
 pgmPath dir pgm = dosifyPath dir ++ '\\' : pgm
 
--- HACK!
-dosifyPath "\"/DLL\"" = "\"/DLL\""
-dosifyPath "\"/QUIET\"" = "\"/QUIET\""
-dosifyPath l@('"':'/':'O':'U':'T':_) = l
--- end of HACK!
 dosifyPath stuff
   = subst '/' '\\' real_stuff
  where