|
| 1 | +diff --git a/src/Distribution/Simple/Configure.hs b/src/Distribution/Simple/Configure.hs |
| 2 | +index ac7bd852f..803475283 100644 |
| 3 | +--- a/src/Distribution/Simple/Configure.hs |
| 4 | ++++ b/src/Distribution/Simple/Configure.hs |
| 5 | +@@ -637,22 +637,6 @@ configure (pkg_descr0, pbi) cfg = do |
| 6 | + "--enable-split-objs; ignoring") |
| 7 | + return False |
| 8 | + |
| 9 | +- let compilerSupportsGhciLibs :: Bool |
| 10 | +- compilerSupportsGhciLibs = |
| 11 | +- case compilerId comp of |
| 12 | +- CompilerId GHC version |
| 13 | +- | version > mkVersion [9,3] && windows -> |
| 14 | +- False |
| 15 | +- CompilerId GHC _ -> |
| 16 | +- True |
| 17 | +- CompilerId GHCJS _ -> |
| 18 | +- True |
| 19 | +- _ -> False |
| 20 | +- where |
| 21 | +- windows = case compPlatform of |
| 22 | +- Platform _ Windows -> True |
| 23 | +- Platform _ _ -> False |
| 24 | +- |
| 25 | + let ghciLibByDefault = |
| 26 | + case compilerId comp of |
| 27 | + CompilerId GHC _ -> |
| 28 | +@@ -669,15 +653,6 @@ configure (pkg_descr0, pbi) cfg = do |
| 29 | + not (GHCJS.isDynamic comp) |
| 30 | + _ -> False |
| 31 | + |
| 32 | +- withGHCiLib_ <- |
| 33 | +- case fromFlagOrDefault ghciLibByDefault (configGHCiLib cfg) of |
| 34 | +- True | not compilerSupportsGhciLibs -> do |
| 35 | +- warn verbosity $ |
| 36 | +- "--enable-library-for-ghci is no longer supported on Windows with" |
| 37 | +- ++ " GHC 9.4 and later; ignoring..." |
| 38 | +- return False |
| 39 | +- v -> return v |
| 40 | +- |
| 41 | + let sharedLibsByDefault |
| 42 | + | fromFlag (configDynExe cfg) = |
| 43 | + -- build a shared library if dynamically-linked |
| 44 | +@@ -774,7 +749,7 @@ configure (pkg_descr0, pbi) cfg = do |
| 45 | + withProfExeDetail = ProfDetailNone, |
| 46 | + withOptimization = fromFlag $ configOptimization cfg, |
| 47 | + withDebugInfo = fromFlag $ configDebugInfo cfg, |
| 48 | +- withGHCiLib = withGHCiLib_, |
| 49 | ++ withGHCiLib = fromFlagOrDefault ghciLibByDefault (configGHCiLib cfg), |
| 50 | + splitSections = split_sections, |
| 51 | + splitObjs = split_objs, |
| 52 | + stripExes = strip_exe, |
| 53 | +diff --git a/src/Distribution/Simple/Setup.hs b/src/Distribution/Simple/Setup.hs |
| 54 | +index 36f6aa22f..aa60b73b8 100644 |
| 55 | +--- a/src/Distribution/Simple/Setup.hs |
| 56 | ++++ b/src/Distribution/Simple/Setup.hs |
| 57 | +@@ -384,12 +384,7 @@ defaultConfigFlags progDb = emptyConfigFlags { |
| 58 | + configCabalFilePath = NoFlag, |
| 59 | + configVerbosity = Flag normal, |
| 60 | + configUserInstall = Flag False, --TODO: reverse this |
| 61 | +-#if defined(mingw32_HOST_OS) |
| 62 | +- -- See #8062 and GHC #21019. |
| 63 | +- configGHCiLib = Flag False, |
| 64 | +-#else |
| 65 | +- configGHCiLib = NoFlag, |
| 66 | +-#endif |
| 67 | ++ configGHCiLib = Flag True, |
| 68 | + configSplitSections = Flag False, |
| 69 | + configSplitObjs = Flag False, -- takes longer, so turn off by default |
| 70 | + configStripExes = NoFlag, |
0 commit comments