Commit 7025dc69 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Add a flag to disable linking with the haskell98 package

parent e796c0f1
...@@ -389,7 +389,9 @@ doLink dflags stop_phase o_files ...@@ -389,7 +389,9 @@ doLink dflags stop_phase o_files
where where
-- Always link in the haskell98 package for static linking. Other -- Always link in the haskell98 package for static linking. Other
-- packages have to be specified via the -package flag. -- packages have to be specified via the -package flag.
link_pkgs = [haskell98PackageId] link_pkgs
| dopt Opt_LinkHaskell98 dflags = [haskell98PackageId]
| otherwise = []
-- --------------------------------------------------------------------------- -- ---------------------------------------------------------------------------
......
...@@ -275,6 +275,7 @@ data DynFlag ...@@ -275,6 +275,7 @@ data DynFlag
| Opt_EmbedManifest | Opt_EmbedManifest
| Opt_RunCPSZ | Opt_RunCPSZ
| Opt_ConvertToZipCfgAndBack | Opt_ConvertToZipCfgAndBack
| Opt_LinkHaskell98
-- keeping stuff -- keeping stuff
| Opt_KeepHiDiffs | Opt_KeepHiDiffs
...@@ -568,6 +569,7 @@ defaultDynFlags = ...@@ -568,6 +569,7 @@ defaultDynFlags =
-- end of initSysTools values -- end of initSysTools values
haddockOptions = Nothing, haddockOptions = Nothing,
flags = [ flags = [
Opt_LinkHaskell98,
Opt_ReadUserPackageConf, Opt_ReadUserPackageConf,
Opt_MonoPatBinds, -- Experimentally, I'm making this non-standard Opt_MonoPatBinds, -- Experimentally, I'm making this non-standard
...@@ -1105,6 +1107,7 @@ dynamic_flags = [ ...@@ -1105,6 +1107,7 @@ dynamic_flags = [
, Flag "keep-tmp-files" (NoArg (setDynFlag Opt_KeepTmpFiles)) Supported , Flag "keep-tmp-files" (NoArg (setDynFlag Opt_KeepTmpFiles)) Supported
------- Miscellaneous ---------------------------------------------- ------- Miscellaneous ----------------------------------------------
, Flag "no-link-haskell98" (NoArg (unSetDynFlag Opt_LinkHaskell98)) Supported
, Flag "no-hs-main" (NoArg (setDynFlag Opt_NoHsMain)) Supported , Flag "no-hs-main" (NoArg (setDynFlag Opt_NoHsMain)) Supported
, Flag "main-is" (SepArg setMainIs ) Supported , Flag "main-is" (SepArg setMainIs ) Supported
, Flag "haddock" (NoArg (setDynFlag Opt_Haddock)) Supported , Flag "haddock" (NoArg (setDynFlag Opt_Haddock)) Supported
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment