Skip to content

Commit 8c92902

Browse files
andreabedinierikd
authored andcommitted
Partially revert haskell#8071
1 parent 1264967 commit 8c92902

File tree

2 files changed

+2
-32
lines changed

2 files changed

+2
-32
lines changed

Cabal/src/Distribution/Simple/Configure.hs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -767,22 +767,6 @@ configure (pkg_descr0, pbi) cfg = do
767767
)
768768
return False
769769

770-
let compilerSupportsGhciLibs :: Bool
771-
compilerSupportsGhciLibs =
772-
case compilerId comp of
773-
CompilerId GHC version
774-
| version > mkVersion [9, 3] && windows ->
775-
False
776-
CompilerId GHC _ ->
777-
True
778-
CompilerId GHCJS _ ->
779-
True
780-
_ -> False
781-
where
782-
windows = case compPlatform of
783-
Platform _ Windows -> True
784-
Platform _ _ -> False
785-
786770
let ghciLibByDefault =
787771
case compilerId comp of
788772
CompilerId GHC _ ->
@@ -799,15 +783,6 @@ configure (pkg_descr0, pbi) cfg = do
799783
not (GHCJS.isDynamic comp)
800784
_ -> False
801785

802-
withGHCiLib_ <-
803-
case fromFlagOrDefault ghciLibByDefault (configGHCiLib cfg) of
804-
True | not compilerSupportsGhciLibs -> do
805-
warn verbosity $
806-
"--enable-library-for-ghci is no longer supported on Windows with"
807-
++ " GHC 9.4 and later; ignoring..."
808-
return False
809-
v -> return v
810-
811786
let sharedLibsByDefault
812787
| fromFlag (configDynExe cfg) =
813788
-- build a shared library if dynamically-linked
@@ -912,7 +887,7 @@ configure (pkg_descr0, pbi) cfg = do
912887
, withProfExeDetail = ProfDetailNone
913888
, withOptimization = fromFlag $ configOptimization cfg
914889
, withDebugInfo = fromFlag $ configDebugInfo cfg
915-
, withGHCiLib = withGHCiLib_
890+
, withGHCiLib = fromFlagOrDefault ghciLibByDefault $ configGHCiLib cfg
916891
, splitSections = split_sections
917892
, splitObjs = split_objs
918893
, stripExes = strip_exe

Cabal/src/Distribution/Simple/Setup/Config.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,12 +322,7 @@ defaultConfigFlags progDb =
322322
, configCabalFilePath = NoFlag
323323
, configVerbosity = Flag normal
324324
, configUserInstall = Flag False -- TODO: reverse this
325-
#if defined(mingw32_HOST_OS)
326-
-- See #8062 and GHC #21019.
327-
, configGHCiLib = Flag False
328-
#else
329-
, configGHCiLib = NoFlag
330-
#endif
325+
, configGHCiLib = Flag True
331326
, configSplitSections = Flag False
332327
, configSplitObjs = Flag False -- takes longer, so turn off by default
333328
, configStripExes = NoFlag

0 commit comments

Comments
 (0)