X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=8958eb78edcd255b0d69dc24b2704e7c5a9534a4;hb=eb86e5a2aa0792c7826eef681048ce3b21633a18;hp=4ba19b0d5b9b0886b28eebec125f44faddf28965;hpb=63e3a41126771e71c44705480c2bde7043a41df3;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 4ba19b0..8958eb7 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -184,6 +184,7 @@ data DynFlag | Opt_WarnLazyUnliftedBindings | Opt_WarnUnusedDoBind | Opt_WarnWrongDoBind + | Opt_WarnAlternativeLayoutRuleTransitional -- language opts @@ -252,6 +253,7 @@ data DynFlag | Opt_NewQualifiedOperators | Opt_ExplicitForAll | Opt_AlternativeLayoutRule + | Opt_AlternativeLayoutRuleTransitional | Opt_PrintExplicitForalls @@ -296,6 +298,7 @@ data DynFlag | Opt_EagerBlackHoling | Opt_ReadUserPackageConf | Opt_NoHsMain + | Opt_RtsOptsEnabled | Opt_SplitObjs | Opt_StgStats | Opt_HideAllPackages @@ -312,6 +315,7 @@ data DynFlag | Opt_EmitExternalCore | Opt_SharedImplib | Opt_BuildingCabalPackage + | Opt_SSE2 -- temporary flags | Opt_RunCPS @@ -403,6 +407,7 @@ data DynFlags = DynFlags { ghcUsagePath :: FilePath, -- Filled in by SysTools ghciUsagePath :: FilePath, -- ditto + rtsOpts :: Maybe String, hpcDir :: String, -- ^ Path to store the .mix files @@ -637,6 +642,7 @@ defaultDynFlags = frameworkPaths = [], cmdlineFrameworks = [], tmpDir = cDEFAULT_TMPDIR, + rtsOpts = Nothing, hpcDir = ".hpc", @@ -929,7 +935,8 @@ standardWarnings Opt_WarnDuplicateExports, Opt_WarnLazyUnliftedBindings, Opt_WarnDodgyForeignImports, - Opt_WarnWrongDoBind + Opt_WarnWrongDoBind, + Opt_WarnAlternativeLayoutRuleTransitional ] minusWOpts :: [DynFlag] @@ -1104,6 +1111,9 @@ dynamic_flags = [ ------- Miscellaneous ---------------------------------------------- , Flag "no-auto-link-packages" (NoArg (unSetDynFlag Opt_AutoLinkPackages)) Supported , Flag "no-hs-main" (NoArg (setDynFlag Opt_NoHsMain)) Supported + , Flag "with-rtsopts" (HasArg setRtsOpts) Supported + , Flag "rtsopts" (NoArg (setDynFlag Opt_RtsOptsEnabled)) Supported + , Flag "no-rtsopts" (NoArg (unSetDynFlag Opt_RtsOptsEnabled)) Supported , Flag "main-is" (SepArg setMainIs ) Supported , Flag "haddock" (NoArg (setDynFlag Opt_Haddock)) Supported , Flag "haddock-opts" (HasArg (upd . addHaddockOpts)) Supported @@ -1265,6 +1275,9 @@ dynamic_flags = [ , Flag "monly-4-regs" (NoArg (upd (\s -> s{stolen_x86_regs = 4}) )) Supported + , Flag "msse2" (NoArg (setDynFlag Opt_SSE2)) + Supported + ------ Warning opts ------------------------------------------------- , Flag "W" (NoArg (mapM_ setDynFlag minusWOpts)) Supported @@ -1460,6 +1473,7 @@ fFlags = [ const $ Deprecated "lazy unlifted bindings will be an error in GHC 6.14, and this flag will no longer exist"), ( "warn-unused-do-bind", Opt_WarnUnusedDoBind, const Supported ), ( "warn-wrong-do-bind", Opt_WarnWrongDoBind, const Supported ), + ( "warn-alternative-layout-rule-transitional", Opt_WarnAlternativeLayoutRuleTransitional, const Supported ), ( "print-explicit-foralls", Opt_PrintExplicitForalls, const Supported ), ( "strictness", Opt_Strictness, const Supported ), ( "specialise", Opt_Specialise, const Supported ), @@ -1597,6 +1611,7 @@ xFlags = [ ( "MonoPatBinds", Opt_MonoPatBinds, const Supported ), ( "ExplicitForAll", Opt_ExplicitForAll, const Supported ), ( "AlternativeLayoutRule", Opt_AlternativeLayoutRule, const Supported ), + ( "AlternativeLayoutRuleTransitional",Opt_AlternativeLayoutRuleTransitional, const Supported ), ( "MonoLocalBinds", Opt_MonoLocalBinds, const Supported ), ( "RelaxedPolyRec", Opt_RelaxedPolyRec, const Supported ), ( "ExtendedDefaultRules", Opt_ExtendedDefaultRules, const Supported ), @@ -2000,6 +2015,12 @@ setTmpDir dir dflags = dflags{ tmpDir = normalise dir } -- seem necessary now --SDM 7/2/2008 ----------------------------------------------------------------------------- +-- RTS opts + +setRtsOpts :: String -> DynP () +setRtsOpts arg = upd $ \ d -> d {rtsOpts = Just arg} + +----------------------------------------------------------------------------- -- Hpc stuff setOptHpcDir :: String -> DynP () @@ -2168,7 +2189,6 @@ compilerInfo = [("Project name", String cProjectName), ("Support SMP", String cGhcWithSMP), ("Unregisterised", String cGhcUnregisterised), ("Tables next to code", String cGhcEnableTablesNextToCode), - ("Win32 DLLs", String cEnableWin32DLLs), ("RTS ways", String cGhcRTSWays), ("Leading underscore", String cLeadingUnderscore), ("Debug on", String (show debugIsOn)),