[GHC] #12628: __GLASGOW_HASKELL_LLVM__ is no longer an Int

GHC ghc-devs at haskell.org
Mon Sep 26 23:48:37 UTC 2016


#12628: __GLASGOW_HASKELL_LLVM__ is no longer an Int
-------------------------------------+-------------------------------------
           Reporter:  nicolast       |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.0.2
          Component:  Driver         |           Version:  8.0.1
           Keywords:  llvm cpp       |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Other
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 From the user guide
 (http://ghc.readthedocs.io/en/8.0.1/phases.html#index-8)

 {{{
 __GLASGOW_HASKELL_LLVM__

     Only defined when -fllvm is specified. When GHC is using version x.y.z
 of LLVM, the value of __GLASGOW_HASKELL_LLVM__ is the integer ⟨xy⟩.
 }}}

 This is not the case, though, due to
 29310b622801733e1b29a9a61988406872db13ca which changes
 {{{figureLlvmVersion :: DynFlags -> IO (Maybe Int)}}} into
 {{{figureLlvmVersion :: DynFlags -> IO (Maybe (Int, Int))}}}, and the
 driver just {{{show}}}ing the result
 (https://github.com/ghc/ghc/blob/29310b622801733e1b29a9a61988406872db13ca/compiler/main/DriverPipeline.hs#L2084)

 As a result, the macro value which used to be a numeric value is now
 something like {{{(3, 7)}}}.

 I'm now using a work-around
 (https://github.com/NicolasT/reedsolomon/commit/9d25ad6a26a29c90b82daacbf406367b8b274c0b),
 but ''or'' the 'tuple value' should become 'official API', ''or'' this is
 a regression to be fixed.

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


More information about the ghc-tickets mailing list