X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FStaticFlagParser.hs;h=5e38af5e253e9e6151ab3637f43fab338954d710;hb=c0ac8b6b2192d296fc28bfc8eb566123e8d72bf0;hp=aaab558c69b20a8e2d1662a3e611fa74f8e4b146;hpb=fc9bbbab3fe56cf0ff5723abbdb0f496d257f34e;p=ghc-hetmet.git diff --git a/compiler/main/StaticFlagParser.hs b/compiler/main/StaticFlagParser.hs index aaab558..5e38af5 100644 --- a/compiler/main/StaticFlagParser.hs +++ b/compiler/main/StaticFlagParser.hs @@ -28,6 +28,21 @@ import Data.List ----------------------------------------------------------------------------- -- Static flags +-- | Parses GHC's static flags from a list of command line arguments. +-- +-- These flags are static in the sense that they can be set only once and they +-- are global, meaning that they affect every instance of GHC running; +-- multiple GHC threads will use the same flags. +-- +-- This function must be called before any session is started, i.e., before +-- the first call to 'GHC.withGhc'. +-- +-- Static flags are more of a hack and are static for more or less historical +-- reasons. In the long run, most static flags should eventually become +-- dynamic flags. +-- +-- XXX: can we add an auto-generated list of static flags here? +-- parseStaticFlags :: [Located String] -> IO ([Located String], [Located String]) parseStaticFlags args = do ready <- readIORef v_opt_C_ready @@ -161,7 +176,6 @@ isStaticFlag f = "fgransim", "fno-hi-version-check", "dno-black-holing", - "fno-method-sharing", "fno-state-hack", "fno-ds-multi-tyvar", "fruntime-types",