summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/GhcMake.hs3
-rw-r--r--compiler/main/Packages.hs1
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/main/GhcMake.hs b/compiler/main/GhcMake.hs
index 85925b3ef9..a6fe5c7f72 100644
--- a/compiler/main/GhcMake.hs
+++ b/compiler/main/GhcMake.hs
@@ -2045,6 +2045,9 @@ enableCodeGenForTH target nodemap =
, ms_hspp_opts = dflags@DynFlags
{hscTarget = HscNothing}
} <- ms
+ -- Don't enable codegen for TH on indefinite packages; we
+ -- can't compile anything anyway! See #16219.
+ , not (isIndefinite dflags)
, ms_mod `Set.member` needs_codegen_set
= do
let new_temp_file suf dynsuf = do
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs
index 70c9c26c11..44258de70c 100644
--- a/compiler/main/Packages.hs
+++ b/compiler/main/Packages.hs
@@ -58,6 +58,7 @@ module Packages (
pprPackages,
pprPackagesSimple,
pprModuleMap,
+ isIndefinite,
isDllName
)
where