summaryrefslogtreecommitdiff
path: root/testsuite/tests/driver/T20696/B.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-02-17 17:16:19 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2022-02-21 15:38:06 +0000
commit86933fc5284ed277ce14853e6dd57a72c7212e49 (patch)
tree39066c0247dad5633c7cf2d6d49850550ff1df3e /testsuite/tests/driver/T20696/B.hs
parentdf029242c53e9b58386a866bd522db1bff5bfb97 (diff)
downloadhaskell-wip/driver-things.tar.gz
driver: Remove needsTemplateHaskellOrQQ from ModuleGraphwip/driver-things
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 'testsuite/tests/driver/T20696/B.hs')
-rw-r--r--testsuite/tests/driver/T20696/B.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/tests/driver/T20696/B.hs b/testsuite/tests/driver/T20696/B.hs
new file mode 100644
index 0000000000..246372a6b4
--- /dev/null
+++ b/testsuite/tests/driver/T20696/B.hs
@@ -0,0 +1,4 @@
+{-# LANGUAGE TemplateHaskell #-}
+module B where
+
+import C