summaryrefslogtreecommitdiff
path: root/compiler/main/DynFlags.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/main/DynFlags.hs')
-rw-r--r--compiler/main/DynFlags.hs19
1 files changed, 13 insertions, 6 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 3fb3874c63..48c7103dd9 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -984,12 +984,18 @@ data DynFlags = DynFlags {
frontendPluginOpts :: [String],
-- ^ the @-ffrontend-opt@ flags given on the command line, in *reverse*
-- order that they're specified on the command line.
- plugins :: [LoadedPlugin],
- -- ^ plugins loaded after processing arguments. What will be loaded here
- -- is directed by pluginModNames. Arguments are loaded from
+ cachedPlugins :: [LoadedPlugin],
+ -- ^ plugins dynamically loaded after processing arguments. What will be
+ -- loaded here is directed by pluginModNames. Arguments are loaded from
-- pluginModNameOpts. The purpose of this field is to cache the plugins so
- -- they don't have to be loaded each time they are needed.
- -- See 'DynamicLoading.initializePlugins'.
+ -- they don't have to be loaded each time they are needed. See
+ -- 'DynamicLoading.initializePlugins'.
+ staticPlugins :: [StaticPlugin],
+ -- ^ staic plugins which do not need dynamic loading. These plugins are
+ -- intended to be added by GHC API users directly to this list.
+ --
+ -- To add dynamically loaded plugins through the GHC API see
+ -- 'addPluginModuleName' instead.
-- GHC API hooks
hooks :: Hooks,
@@ -1917,7 +1923,8 @@ defaultDynFlags mySettings (myLlvmTargets, myLlvmPasses) =
pluginModNames = [],
pluginModNameOpts = [],
frontendPluginOpts = [],
- plugins = [],
+ cachedPlugins = [],
+ staticPlugins = [],
hooks = emptyHooks,
outputFile = Nothing,