summaryrefslogtreecommitdiff
path: root/docs/users_guide/extending_ghc.rst
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2016-12-11 11:32:28 +0000
committerTamar Christina <tamar@zhox.com>2016-12-11 15:29:17 +0000
commitc3c702441137dc8f7ee0dd5ac313be96d625459a (patch)
treea59633ac90b97a7df7c09db560bf8030c15ebf2e /docs/users_guide/extending_ghc.rst
parent490b9429a8ed3c55d17bf0964fb14582eb206a3d (diff)
downloadhaskell-c3c702441137dc8f7ee0dd5ac313be96d625459a.tar.gz
Make globals use sharedCAF
Summary: The use of globals is quite painful when multiple rts are loaded, e.g. when plugins are loaded, which bring in a second rts. The sharedCAF appraoch was employed for the FastStringTable; I've taken the libery to extend this to the other globals I could find. This is a reboot of D2575, that should hopefully not exhibit the same windows build issues. Reviewers: Phyx, simonmar, goldfire, bgamari, austin, hvr, erikd Reviewed By: Phyx, simonmar, bgamari Subscribers: mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2773
Diffstat (limited to 'docs/users_guide/extending_ghc.rst')
-rw-r--r--docs/users_guide/extending_ghc.rst13
1 files changed, 0 insertions, 13 deletions
diff --git a/docs/users_guide/extending_ghc.rst b/docs/users_guide/extending_ghc.rst
index 17d061ec3e..c02c93fac1 100644
--- a/docs/users_guide/extending_ghc.rst
+++ b/docs/users_guide/extending_ghc.rst
@@ -305,7 +305,6 @@ just returns the original compilation pipeline, unmodified, and says
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install _ todo = do
- reinitializeGlobals
putMsgS "Hello!"
return todo
@@ -314,16 +313,6 @@ cabal for instance,) you can then use it by just specifying
``-fplugin=DoNothing.Plugin`` on the command line, and during the
compilation you should see GHC say 'Hello'.
-Note carefully the ``reinitializeGlobals`` call at the beginning of the
-installation function. Due to bugs in the windows linker dealing with
-``libghc``, this call is necessary to properly ensure compiler plugins
-have the same global state as GHC at the time of invocation. Without
-``reinitializeGlobals``, compiler plugins can crash at runtime because
-they may require state that hasn't otherwise been initialized.
-
-In the future, when the linking bugs are fixed, ``reinitializeGlobals``
-will be deprecated with a warning, and changed to do nothing.
-
.. _core-plugins-in-more-detail:
Core plugins in more detail
@@ -396,7 +385,6 @@ in a module it compiles:
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install _ todo = do
- reinitializeGlobals
return (CoreDoPluginPass "Say name" pass : todo)
pass :: ModGuts -> CoreM ModGuts
@@ -446,7 +434,6 @@ will print out the name of any top-level non-recursive binding with the
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install _ todo = do
- reinitializeGlobals
return (CoreDoPluginPass "Say name" pass : todo)
pass :: ModGuts -> CoreM ModGuts