[GHC] #12678: -threaded is listed as a dynamic flag but is silently ignored in OPTIONS_GHC

GHC ghc-devs at haskell.org
Mon Oct 10 00:23:48 UTC 2016


#12678: -threaded is listed as a dynamic flag but is silently ignored in
OPTIONS_GHC
-------------------------------------+-------------------------------------
           Reporter:  enolan         |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Incorrect result
  Unknown/Multiple                   |  at runtime
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 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:

 {{{#!hs
 {-# 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.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12678>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list