Ditch static flags
[ghc.git] / testsuite / tests / plugins / LinkerTicklingPlugin.hs
1 module LinkerTicklingPlugin where
2
3 import GhcPlugins
4 import DynFlags
5
6 plugin :: Plugin
7 plugin = defaultPlugin {
8 installCoreToDos = install
9 }
10
11 -- This tests whether plugins are linking against the *running* GHC or a new
12 -- instance of it. If it is a new instance (settings unsafeGlobalDynFlags) won't
13 -- have been initialised, so we'll get a GHC panic here:
14 install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
15 install _options todos = settings unsafeGlobalDynFlags `seq` return todos