summaryrefslogtreecommitdiff
path: root/testsuite/tests/plugins/LinkerTicklingPlugin.hs
blob: 52d5e177bb5d25f1f07828f952cb7a8648f0d583 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module LinkerTicklingPlugin where

import GhcPlugins
import StaticFlags

plugin :: Plugin
plugin = defaultPlugin {
        installCoreToDos = install
    }

-- This tests whether plugins are linking against the *running* GHC
-- or a new instance of it. If it is a new instance the staticFlags
-- won't have been initialised, so we'll get a GHC panic here:
install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
install _options todos = length staticFlags `seq` return todos