summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Petersen <juhpetersen@gmail.com>2021-12-17 09:22:32 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-01-18 16:12:14 -0500
commit18c797b80b938b648704f118dacbfe8655aaeea5 (patch)
treec278cbac9790a631175fc89c946db9570d2c02af
parentf161e890dfd41fd9735f4e259fffe2ce6d00ec1a (diff)
downloadhaskell-18c797b80b938b648704f118dacbfe8655aaeea5.tar.gz
hadrian BinaryDist: version ghc in ghciScriptWrapper
like we do for the non-Hadrian wrapper script. Otherwise if $bindir/ghc is a different ghc version then versioned ghci will incorrectly run the other ghc version instead. (Normally this would only happen if there are parallel ghc versions installed in bindir.) All the other wrapper scripts already have versioned executablename
-rw-r--r--hadrian/src/Rules/BinaryDist.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs
index 7db11dddd0..da6f27d1de 100644
--- a/hadrian/src/Rules/BinaryDist.hs
+++ b/hadrian/src/Rules/BinaryDist.hs
@@ -425,8 +425,10 @@ runGhcWrapper = pure $ "exec \"$executablename\" -f \"$exedir/ghc\" ${1+\"$@\"}\
-- | We need to ship ghci executable, which basically just calls ghc with
-- | --interactive flag.
ghciScriptWrapper :: Action String
-ghciScriptWrapper = pure $ unlines
- [ "executable=\"$bindir/ghc\""
+ghciScriptWrapper = do
+ version <- setting ProjectVersion
+ pure $ unlines
+ [ "executable=\"$bindir/ghc-" ++ version ++ "\""
, "exec $executable --interactive \"$@\"" ]
-- | When not on Windows, we want to ship the 3 flavours of the iserv program