summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2022-03-02 09:55:58 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-03-03 13:49:53 -0500
commitc534b3dd30de8d5a59ff64628a6a0b3eb938a102 (patch)
tree27468eabfc23e9117a5bef481793e5ed453cedc1
parent559d4cf3b30a926255902fd0e845090d4160fa4c (diff)
downloadhaskell-c534b3dd30de8d5a59ff64628a6a0b3eb938a102.tar.gz
Replace ad-hoc CPP with constant from GHC.Utils.Constant
Fixes #21154
-rw-r--r--compiler/GHC/Driver/Make.hs10
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs
index c1b54438d7..bd4b4eeb57 100644
--- a/compiler/GHC/Driver/Make.hs
+++ b/compiler/GHC/Driver/Make.hs
@@ -15,7 +15,6 @@
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE MultiWayIf #-}
-{-# LANGUAGE CPP #-}
{-# LANGUAGE RecordWildCards #-}
-- -----------------------------------------------------------------------------
@@ -151,7 +150,7 @@ import Control.Concurrent.STM
import Control.Monad.Trans.Maybe
import GHC.Runtime.Loader
import GHC.Rename.Names
-
+import GHC.Utils.Constants
-- -----------------------------------------------------------------------------
-- Loading the program
@@ -1732,14 +1731,9 @@ enableCodeGenWhen logger tmpfs staticLife dynLife unit_env mod_graph =
-- #16331 - when no "internal interpreter" is available but we
-- need to process some TemplateHaskell or QuasiQuotes, we automatically
-- turn on -fexternal-interpreter.
- ext_interp_enable ms = not host_internalInterpreter && internalInterpreter
+ ext_interp_enable ms = not ghciSupported && internalInterpreter
where
lcl_dflags = ms_hspp_opts ms
-#if defined(HAVE_INTERNAL_INTERPRETER)
- host_internalInterpreter = True
-#else
- host_internalInterpreter = False
-#endif
internalInterpreter = not (gopt Opt_ExternalInterpreter lcl_dflags)