diff options
Diffstat (limited to 'driver/ghci')
-rw-r--r-- | driver/ghci/ghci-wrapper.cabal.in | 4 | ||||
-rw-r--r-- | driver/ghci/ghci.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/driver/ghci/ghci-wrapper.cabal.in b/driver/ghci/ghci-wrapper.cabal.in index 5a422aab9b..2a5ff2bb15 100644 --- a/driver/ghci/ghci-wrapper.cabal.in +++ b/driver/ghci/ghci-wrapper.cabal.in @@ -26,3 +26,7 @@ Executable ghci C-Sources: -- the following get copied from ../utils by hadrian getLocation.c isMinTTY.c cwrapper.c + -- We need to call the versioned ghc executable because the unversioned + -- GHC executable is a wrapper that doesn't call FreeConsole and so + -- breaks an interactive process like GHCi. See #21889, #14150 and #13411 + CPP-Options: -DEXE_PATH="ghc-@ProjectVersion@" diff --git a/driver/ghci/ghci.c b/driver/ghci/ghci.c index a603655ec8..652770e39e 100644 --- a/driver/ghci/ghci.c +++ b/driver/ghci/ghci.c @@ -33,7 +33,7 @@ int main(int argc, char** argv) { } binDir = getExecutablePath(); - exePath = mkString("%s/ghc.exe", binDir); + exePath = mkString("%s/%s.exe", binDir, EXE_PATH); preArgv[0] = "--interactive"; /* If ghc.exe can't be found, we assume that we're building ghc from |