Skip to content

Commit 28b3e83

Browse files
committed
Restore initDynLinker for older versions of ghc
It was probably important for something
1 parent 705d47d commit 28b3e83

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ghcide/session-loader/Development/IDE/Session.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,10 @@ cradleToOptsAndLibDir cradle file = do
503503
emptyHscEnv :: IORef NameCache -> FilePath -> IO HscEnv
504504
emptyHscEnv nc libDir = do
505505
env <- runGhc (Just libDir) getSession
506-
-- initDynLinker env -- This causes ghc9 to crash
506+
#if !MIN_GHC_API_VERSION(9,0,0)
507+
-- This causes ghc9 to crash
508+
initDynLinker env
509+
#endif
507510
pure $ setNameCache nc env{ hsc_dflags = (hsc_dflags env){useUnicode = True } }
508511

509512
data TargetDetails = TargetDetails

0 commit comments

Comments
 (0)