Skip to content

Commit

Permalink
cabal: Make workaround-ghc-mmap-crash a noop on non-x86_64. (#2657)
Browse files Browse the repository at this point in the history
Fixes #2656
  • Loading branch information
rowanG077 authored Feb 4, 2024
1 parent d6277c3 commit 22b3a58
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* cabal: Make `workaround-ghc-mmap-crash` a noop on non-x86_64. Fixes [#2656](https://github.com/clash-lang/clash-compiler/issues/2656)
2 changes: 1 addition & 1 deletion clash-ghc/clash-ghc.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ executable clash
GHC-Options: -dynamic
-- Note that multiple -with-rtsopts are not cumulative, so we can't add the
-- common RTS options in the unconditional GHC-Options
if flag(workaround-ghc-mmap-crash)
if arch(x86_64) && flag(workaround-ghc-mmap-crash)
GHC-Options: "-with-rtsopts=-A128m -xm20000000"
else
GHC-Options: -with-rtsopts=-A128m
Expand Down
2 changes: 1 addition & 1 deletion clash-lib/clash-lib.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ test-suite unittests
ghc-options: -Wall -Wcompat -threaded
-- Note that multiple -with-rtsopts are not cumulative, so we can't add the
-- common RTS options in the unconditional GHC-Options
if flag(workaround-ghc-mmap-crash)
if arch(x86_64) && flag(workaround-ghc-mmap-crash)
GHC-Options: "-with-rtsopts=-N -xm20000000"
else
GHC-Options: -with-rtsopts=-N
Expand Down
4 changes: 2 additions & 2 deletions clash-prelude/clash-prelude.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ test-suite doctests
doctest-parallel >= 0.3.1 && < 0.4,
filepath

if flag(workaround-ghc-mmap-crash)
if arch(x86_64) && flag(workaround-ghc-mmap-crash)
ghc-options: -with-rtsopts=-xm20000000

if flag(multiple-hidden)
Expand All @@ -401,7 +401,7 @@ test-suite unittests
main-is: unittests.hs
ghc-options: -Wall -Wcompat -threaded
-- Note that multiple -with-rtsopts are not cumulative
if flag(workaround-ghc-mmap-crash)
if arch(x86_64) && flag(workaround-ghc-mmap-crash)
ghc-options: "-with-rtsopts=-N -xm20000000"
else
ghc-options: -with-rtsopts=-N
Expand Down
2 changes: 1 addition & 1 deletion tests/clash-testsuite.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ common basic-config
if flag(multiple-hidden)
cpp-options: -DCLASH_MULTIPLE_HIDDEN

if flag(workaround-ghc-mmap-crash)
if arch(x86_64) && flag(workaround-ghc-mmap-crash)
cpp-options: -DCLASH_WORKAROUND_GHC_MMAP_CRASH

library
Expand Down

0 comments on commit 22b3a58

Please sign in to comment.