[project @ 2002-02-08 15:00:40 by simonmar]
authorsimonmar <unknown>
Fri, 8 Feb 2002 15:00:40 +0000 (15:00 +0000)
committersimonmar <unknown>
Fri, 8 Feb 2002 15:00:40 +0000 (15:00 +0000)
Avoid using findPS/packString where simple string matching will do.

ghc/compiler/main/DriverPipeline.hs

index 0da82e1..f48f9e0 100644 (file)
@@ -58,7 +58,6 @@ import Monad
 import Maybe
 
 import PackedString
-import MatchPS
 
 -----------------------------------------------------------------------------
 -- genPipeline
@@ -981,9 +980,9 @@ doMkDLL o_files = do
         ++ pkg_lib_path_opts
         ++ pkg_lib_opts
         ++ pkg_extra_ld_opts
-         ++ (case findPS (packString (concat extra_ld_opts)) (packString "--def") of
-               Nothing -> [ "--export-all" ]
-              Just _  -> [ "" ])
+         ++ (if "--def" `elem` (concatMap words extra_ld_opts)
+              then [ "" ]
+               else [ "--export-all" ])
         ++ extra_ld_opts
        ))