-threaded is listed as a dynamic flag but is silently ignored in OPTIONS_GHC
Hi GHC folks.
In section 6.1.2.2 of the user's guide it says "Only dynamic flags can be used in an OPTIONS_GHC pragma" and in section 6.6 it says -threaded
is a dynamic flag. However, the following program compiles successfully but doesn't get linked with the threaded RTS unless I add the option on the command line:
{-# OPTIONS_GHC -threaded #-}
main = return ()
Running ./foo +RTS --info
reports ("RTS way", "rts_v")
when it should say rts_thr
.
Either -threaded
should be settable in OPTIONS_GHC
pragmas, or setting it should be an error that aborts compilation. The documentation should accurately state the rules regardless.
This happens on 8.0.1, 7.10.3 and the ghc-8.0
branch. I didn't check master.
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |