From: Ian Lynagh Date: Sat, 5 Jul 2008 13:41:15 +0000 (+0000) Subject: Add a flag to disable linking with the haskell98 package X-Git-Tag: Before_cabalised-GHC~77 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=7025dc693281254624b9cbbf84fd44b73c58eff5 Add a flag to disable linking with the haskell98 package --- diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index b848e83..8543707 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -389,7 +389,9 @@ doLink dflags stop_phase o_files where -- Always link in the haskell98 package for static linking. Other -- packages have to be specified via the -package flag. - link_pkgs = [haskell98PackageId] + link_pkgs + | dopt Opt_LinkHaskell98 dflags = [haskell98PackageId] + | otherwise = [] -- --------------------------------------------------------------------------- diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 637907f..04d2003 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -275,6 +275,7 @@ data DynFlag | Opt_EmbedManifest | Opt_RunCPSZ | Opt_ConvertToZipCfgAndBack + | Opt_LinkHaskell98 -- keeping stuff | Opt_KeepHiDiffs @@ -568,6 +569,7 @@ defaultDynFlags = -- end of initSysTools values haddockOptions = Nothing, flags = [ + Opt_LinkHaskell98, Opt_ReadUserPackageConf, Opt_MonoPatBinds, -- Experimentally, I'm making this non-standard @@ -1105,6 +1107,7 @@ dynamic_flags = [ , Flag "keep-tmp-files" (NoArg (setDynFlag Opt_KeepTmpFiles)) Supported ------- Miscellaneous ---------------------------------------------- + , Flag "no-link-haskell98" (NoArg (unSetDynFlag Opt_LinkHaskell98)) Supported , Flag "no-hs-main" (NoArg (setDynFlag Opt_NoHsMain)) Supported , Flag "main-is" (SepArg setMainIs ) Supported , Flag "haddock" (NoArg (setDynFlag Opt_Haddock)) Supported