Commit 53ec704b authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Extend the flag for not automatically linking haskell98

It now also doesn't automatically link base and rts either.
We need this when we've done a build, so base and rts are in the
package.conf, but we've then cleaned the libraries so they don't
physically exist any more.
parent 7e1ca77b
...@@ -275,7 +275,7 @@ data DynFlag ...@@ -275,7 +275,7 @@ data DynFlag
| Opt_EmbedManifest | Opt_EmbedManifest
| Opt_RunCPSZ | Opt_RunCPSZ
| Opt_ConvertToZipCfgAndBack | Opt_ConvertToZipCfgAndBack
| Opt_LinkHaskell98 | Opt_AutoLinkPackages
-- keeping stuff -- keeping stuff
| Opt_KeepHiDiffs | Opt_KeepHiDiffs
...@@ -569,7 +569,7 @@ defaultDynFlags = ...@@ -569,7 +569,7 @@ defaultDynFlags =
-- end of initSysTools values -- end of initSysTools values
haddockOptions = Nothing, haddockOptions = Nothing,
flags = [ flags = [
Opt_LinkHaskell98, Opt_AutoLinkPackages,
Opt_ReadUserPackageConf, Opt_ReadUserPackageConf,
Opt_MonoPatBinds, -- Experimentally, I'm making this non-standard Opt_MonoPatBinds, -- Experimentally, I'm making this non-standard
...@@ -1107,7 +1107,7 @@ dynamic_flags = [ ...@@ -1107,7 +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-auto-link-packages" (NoArg (unSetDynFlag Opt_AutoLinkPackages)) 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
......
...@@ -548,8 +548,10 @@ mkPackageState dflags orig_pkg_db preload0 this_package = do ...@@ -548,8 +548,10 @@ mkPackageState dflags orig_pkg_db preload0 this_package = do
let pkg_db = extendPackageConfigMap emptyPackageConfigMap pkgs let pkg_db = extendPackageConfigMap emptyPackageConfigMap pkgs
-- add base & rts to the preload packages -- add base & rts to the preload packages
basicLinkedPackages = filter (flip elemUFM pkg_db) basicLinkedPackages
[basePackageId,rtsPackageId] | dopt Opt_AutoLinkPackages dflags
= filter (flip elemUFM pkg_db) [basePackageId, rtsPackageId]
| otherwise = []
-- but in any case remove the current package from the set of -- but in any case remove the current package from the set of
-- preloaded packages so that base/rts does not end up in the -- preloaded packages so that base/rts does not end up in the
-- set up preloaded package when we are just building it -- set up preloaded package when we are just building it
......
...@@ -967,7 +967,7 @@ SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS))) ...@@ -967,7 +967,7 @@ SRC_HSC2HS_OPTS += $(addprefix --cflag=,$(filter-out -O,$(SRC_CC_OPTS)))
SRC_HSC2HS_OPTS += --cc=$(CC) SRC_HSC2HS_OPTS += --cc=$(CC)
SRC_HSC2HS_OPTS += --ld=$(CC) SRC_HSC2HS_OPTS += --ld=$(CC)
SRC_HSC2HS_OPTS += --cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt) SRC_HSC2HS_OPTS += --cflag=-D__GLASGOW_HASKELL__=$(ProjectVersionInt)
SRC_HSC2HS_OPTS += --lflag=-no-link-haskell98 SRC_HSC2HS_OPTS += --lflag=-no-auto-link-packages
SRC_HSC2HS_OPTS += -I$(GHC_INCLUDE_DIR_ABS) SRC_HSC2HS_OPTS += -I$(GHC_INCLUDE_DIR_ABS)
SRC_HSC2HS_OPTS += -I$(FPTOOLS_TOP_ABS)/gmp/gmpbuild SRC_HSC2HS_OPTS += -I$(FPTOOLS_TOP_ABS)/gmp/gmpbuild
......
Supports Markdown
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