Enable ghc mmap crash workaround for every ghc compiled binary #2572
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 everywherevia 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
andclash-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: