Skip to content

Commit

Permalink
Partially revert haskell#8071
Browse files Browse the repository at this point in the history
  • Loading branch information
andreabedini authored and erikd committed Nov 6, 2023
1 parent 2fca50b commit 8662391
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
27 changes: 1 addition & 26 deletions Cabal/src/Distribution/Simple/Configure.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 _ ->
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions Cabal/src/Distribution/Simple/Setup/Config.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8662391

Please sign in to comment.