Commit c211f8e5 authored by Joachim Breitner's avatar Joachim Breitner Committed by Austin Seipp

Add __GLASGOW_HASKELL_TH__=YES/NO to CPP definitions

Test Plan: None really.

Reviewers: austin

Reviewed By: austin

Subscribers: thomie, carter, simonmar

Differential Revision:

GHC Trac Issues: #9734
parent 3d27f697
......@@ -2100,6 +2100,11 @@ doCpp dflags raw input_fn output_fn = do
backend_defs <- getBackendDefs dflags
#ifdef GHCI
let th_defs = [ "-D__GLASGOW_HASKELL_TH__=YES" ]
let th_defs = [ "-D__GLASGOW_HASKELL_TH__=NO" ]
-- Default CPP defines in Haskell source
ghcVersionH <- getGhcVersionPathName dflags
let hsSourceCppOpts =
......@@ -2112,6 +2117,7 @@ doCpp dflags raw input_fn output_fn = do
++ map SysTools.Option hsSourceCppOpts
++ map SysTools.Option target_defs
++ map SysTools.Option backend_defs
++ map SysTools.Option th_defs
++ map SysTools.Option hscpp_opts
++ map SysTools.Option sse_defs
++ map SysTools.Option avx_defs
......@@ -466,6 +466,21 @@ $ cat foo.hspp</screen>
This is set to <literal>YES</literal> when the compiler supports Template Haskell, and to
<literal>NO</literal> when not. The latter is the case for a stage-1 compiler during bootstrapping, or
on architectures where the interpreter is not available.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment