In PRs #2444 we added the workaround-ghc-mmap-crash flag on some of our packages.
That flag added -with-rtsopts=-xm20000000 to some of our binaries.
But other binaries would occasionally still trigger the mmap bug,
most importantly ghc itself.
This commit undoes the previous way of applying the workaround and
applies the same -xm20000000 RTS option everywhere
via the GHCRTS environment variable.
But for this to work we have to link all binaries with the -rtsopts
flag, otherwise they'll just ignore the GHCRTS.
Unfortunately this is impossible for custom setups, like used by clash-cosim and clash-ffi-example.
Therefor we clear the GHCRTS variable when building just those packages. And hope we don't hit the mmap issue while building those.
Still TODO:
[ ] Write a changelog entry (see changelog/README.md)
[ ] Check copyright notices are up to date in edited files
In PRs #2444 we added the
workaround-ghc-mmap-crash
flag on some of our packages. That flag added-with-rtsopts=-xm20000000
to some of our binaries.But other binaries would occasionally still trigger the mmap bug, most importantly ghc itself.
This commit undoes the previous way of applying the workaround and applies the same
-xm20000000
RTS option everywhere via the GHCRTS environment variable.But for this to work we have to link all binaries with the
-rtsopts
flag, otherwise they'll just ignore the GHCRTS. Unfortunately this is impossible for custom setups, like used byclash-cosim
andclash-ffi-example
. Therefor we clear theGHCRTS
variable when building just those packages. And hope we don't hit the mmap issue while building those.Still TODO: