Skip to content

Accept GHCRTS=-N1 when not compiled with -threaded

current behaviour:

> ghc Main.hs -o test
> ./test +RTS -N1
test: the flag -N1 requires the program to be built with -threaded
[blah blah]

requested:

> ghc Main.hs -o test
> ./test +RTS -N1
hello world

Motivation: In certain environments, threaded is bad idea due to resource constraints even when multiple capabilities are available, because resident memory can increase with parallel execution. Slapping GHCRTS=-N1 onto those environments would be nice, but breaks for things not compiled with -threaded.

Trac metadata
Trac field Value
Version 8.6.1
Type FeatureRequest
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Runtime System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information