Make globals use sharedCAF
authorMoritz Angermann <moritz.angermann@gmail.com>
Tue, 29 Nov 2016 21:50:32 +0000 (16:50 -0500)
committerBen Gamari <ben@smart-cactus.org>
Tue, 29 Nov 2016 21:50:33 +0000 (16:50 -0500)
commit6f7ed1e51bf360621a3c2a447045ab3012f68575
treef6e047df820dce2a049ead7927c1b36e95b2bfdd
parent795f8bd460d604c792a5df8cfec937b2a74c3956
Make globals use sharedCAF

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.

Reviewers: rwbarton, simonmar, austin, hvr, erikd, bgamari

Reviewed By: simonmar, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2575
14 files changed:
compiler/HsVersions.h
compiler/ghci/Linker.hs
compiler/main/DynFlags.hs
compiler/main/StaticFlags.hs
compiler/simplCore/CoreMonad.hs
compiler/utils/FastString.hs
compiler/utils/Util.hs
docs/users_guide/extending_ghc.rst
includes/rts/Globals.h
libraries/base/GHC/Conc/Sync.hs
rts/Globals.c
testsuite/tests/plugins/LinkerTicklingPlugin.hs
testsuite/tests/plugins/annotation-plugin/SayAnnNames.hs
testsuite/tests/simplCore/should_compile/T7702plugin/T7702Plugin.hs