Skip to content

Commit 22b3a58

Browse files
authored
cabal: Make workaround-ghc-mmap-crash a noop on non-x86_64. (#2657)
Fixes #2656
1 parent d6277c3 commit 22b3a58

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* cabal: Make `workaround-ghc-mmap-crash` a noop on non-x86_64. Fixes [#2656](https://github.com/clash-lang/clash-compiler/issues/2656)

clash-ghc/clash-ghc.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ executable clash
7979
GHC-Options: -dynamic
8080
-- Note that multiple -with-rtsopts are not cumulative, so we can't add the
8181
-- common RTS options in the unconditional GHC-Options
82-
if flag(workaround-ghc-mmap-crash)
82+
if arch(x86_64) && flag(workaround-ghc-mmap-crash)
8383
GHC-Options: "-with-rtsopts=-A128m -xm20000000"
8484
else
8585
GHC-Options: -with-rtsopts=-A128m

clash-lib/clash-lib.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ test-suite unittests
389389
ghc-options: -Wall -Wcompat -threaded
390390
-- Note that multiple -with-rtsopts are not cumulative, so we can't add the
391391
-- common RTS options in the unconditional GHC-Options
392-
if flag(workaround-ghc-mmap-crash)
392+
if arch(x86_64) && flag(workaround-ghc-mmap-crash)
393393
GHC-Options: "-with-rtsopts=-N -xm20000000"
394394
else
395395
GHC-Options: -with-rtsopts=-N

clash-prelude/clash-prelude.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ test-suite doctests
388388
doctest-parallel >= 0.3.1 && < 0.4,
389389
filepath
390390

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

394394
if flag(multiple-hidden)
@@ -401,7 +401,7 @@ test-suite unittests
401401
main-is: unittests.hs
402402
ghc-options: -Wall -Wcompat -threaded
403403
-- Note that multiple -with-rtsopts are not cumulative
404-
if flag(workaround-ghc-mmap-crash)
404+
if arch(x86_64) && flag(workaround-ghc-mmap-crash)
405405
ghc-options: "-with-rtsopts=-N -xm20000000"
406406
else
407407
ghc-options: -with-rtsopts=-N

tests/clash-testsuite.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ common basic-config
9292
if flag(multiple-hidden)
9393
cpp-options: -DCLASH_MULTIPLE_HIDDEN
9494

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

9898
library

0 commit comments

Comments
 (0)