diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-02-17 17:16:19 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-02-23 14:00:01 -0500 |
commit | 818ff2ef76908499454ceed94329c133a1aad918 (patch) | |
tree | 540250e9ee870c73987ae6bcbdf534caae0846a2 /compiler/GHC.hs | |
parent | 6215b04cc6d81ebaa86545e8b5701d1e54290325 (diff) | |
download | haskell-818ff2ef76908499454ceed94329c133a1aad918.tar.gz |
driver: Remove needsTemplateHaskellOrQQ from ModuleGraph
The idea of the needsTemplateHaskellOrQQ query is to check if any of the
modules in a module graph need Template Haskell then enable -dynamic-too
if necessary. This is quite imprecise though as it will enable
-dynamic-too for all modules in the module graph even if only one module
uses template haskell, with multiple home units, this is obviously even
worse.
With -fno-code we already have similar logic to enable code generation
just for the modules which are dependeded on my TemplateHaskell modules
so we use the same code path to decide whether to enable -dynamic-too
rather than using this big hammer.
This is part of the larger overall goal of moving as much statically
known configuration into the downsweep as possible in order to have
fully decided the build plan and all the options before starting to
build anything.
I also included a fix to #21095, a long standing bug with with the logic
which is supposed to enable the external interpreter if we don't have
the internal interpreter.
Fixes #20696 #21095
Diffstat (limited to 'compiler/GHC.hs')
-rw-r--r-- | compiler/GHC.hs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/GHC.hs b/compiler/GHC.hs index 59790e3b68..2d2de4550b 100644 --- a/compiler/GHC.hs +++ b/compiler/GHC.hs @@ -25,7 +25,6 @@ module GHC ( runGhc, runGhcT, initGhcMonad, printException, handleSourceError, - needsTemplateHaskellOrQQ, -- * Flags and settings DynFlags(..), GeneralFlag(..), Severity(..), Backend(..), gopt, |