Cabal configuration for compiler flags and runtime options

I am trying to get a cabal configuration equivalent to compiling with ghc -threaded -O2

and then working with my.exe +RTS -N4 -s

. I am currently

executable my.exe
   ghc-options: 
        -O3
        -threaded
        -rtsopts
        -with-rtsopts="-N4"
   main-is: Main.hs

      

When I run my.exe

it gives meunexpected RTS argument: -N4

+3


source to share


1 answer


For multiple options, put the entire field in quotes:

"-c-rtsopts = -N4 -s"



Alternatively, you can add each option separately:

-c-rtsopts = -N4

-c-rtsopts = -s

+3


source







All Articles