GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2022-07-11T08:53:55Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/21817Hadrian: runghc wrapper is not passed libdir2022-07-11T08:53:55Zsheafsam.derbyshire@gmail.comHadrian: runghc wrapper is not passed libdirThe `runGhc` wrapper created by Hadrian is not passed `libdir`, unlike the wrapper for the `ghc` executable. This can lead to inconsistencies, where `ghc` and `runGhc` end up looking for the `libdir` in different places. This is undesira...The `runGhc` wrapper created by Hadrian is not passed `libdir`, unlike the wrapper for the `ghc` executable. This can lead to inconsistencies, where `ghc` and `runGhc` end up looking for the `libdir` in different places. This is undesirable as it complicates things when one tries to relocate the wrappers (different wrappers behaving differently).
The fix is simple: pass `libdir` to the `runGhc` wrapper, matching the behaviour of the `ghc` executable wrapper. Fix in !8581.https://gitlab.haskell.org/ghc/ghc/-/issues/20716`-x` option not working in runghc2021-11-23T16:19:26Zstasoid`-x` option not working in runghcThis code doesn't work in ghc 9.0.1:
```bash
echo 'main = print 123' > f
runghc -x hs f
```
[Try it online in ghc 8.2.2](https://tio.run/##S0oszvj/PzU5I19BPTcxM0/BVqGgKDOvRMHQyFhdwU4hjauoNC89I1lBt0Iho1gh7f9/AA).This code doesn't work in ghc 9.0.1:
```bash
echo 'main = print 123' > f
runghc -x hs f
```
[Try it online in ghc 8.2.2](https://tio.run/##S0oszvj/PzU5I19BPTcxM0/BVqGgKDOvRMHQyFhdwU4hjauoNC89I1lBt0Iho1gh7f9/AA).Ben GamariBen Gamari