diff --git a/Cabal/src/Distribution/Simple/Configure.hs b/Cabal/src/Distribution/Simple/Configure.hs index f35f98f4fcb..d43a8f74de8 100644 --- a/Cabal/src/Distribution/Simple/Configure.hs +++ b/Cabal/src/Distribution/Simple/Configure.hs @@ -767,22 +767,6 @@ configure (pkg_descr0, pbi) cfg = do ) return False - let compilerSupportsGhciLibs :: Bool - compilerSupportsGhciLibs = - case compilerId comp of - CompilerId GHC version - | version > mkVersion [9, 3] && windows -> - False - CompilerId GHC _ -> - True - CompilerId GHCJS _ -> - True - _ -> False - where - windows = case compPlatform of - Platform _ Windows -> True - Platform _ _ -> False - let ghciLibByDefault = case compilerId comp of CompilerId GHC _ -> @@ -799,15 +783,6 @@ configure (pkg_descr0, pbi) cfg = do not (GHCJS.isDynamic comp) _ -> False - withGHCiLib_ <- - case fromFlagOrDefault ghciLibByDefault (configGHCiLib cfg) of - True | not compilerSupportsGhciLibs -> do - warn verbosity $ - "--enable-library-for-ghci is no longer supported on Windows with" - ++ " GHC 9.4 and later; ignoring..." - return False - v -> return v - let sharedLibsByDefault | fromFlag (configDynExe cfg) = -- build a shared library if dynamically-linked @@ -912,7 +887,7 @@ configure (pkg_descr0, pbi) cfg = do , withProfExeDetail = ProfDetailNone , withOptimization = fromFlag $ configOptimization cfg , withDebugInfo = fromFlag $ configDebugInfo cfg - , withGHCiLib = withGHCiLib_ + , withGHCiLib = fromFlagOrDefault ghciLibByDefault $ configGHCiLib cfg , splitSections = split_sections , splitObjs = split_objs , stripExes = strip_exe diff --git a/Cabal/src/Distribution/Simple/Setup/Config.hs b/Cabal/src/Distribution/Simple/Setup/Config.hs index 05fd07f33ca..210460d12b4 100644 --- a/Cabal/src/Distribution/Simple/Setup/Config.hs +++ b/Cabal/src/Distribution/Simple/Setup/Config.hs @@ -322,12 +322,7 @@ defaultConfigFlags progDb = , configCabalFilePath = NoFlag , configVerbosity = Flag normal , configUserInstall = Flag False -- TODO: reverse this -#if defined(mingw32_HOST_OS) - -- See #8062 and GHC #21019. - , configGHCiLib = Flag False -#else - , configGHCiLib = NoFlag -#endif + , configGHCiLib = Flag True , configSplitSections = Flag False , configSplitObjs = Flag False -- takes longer, so turn off by default , configStripExes = NoFlag