on master help sign in
Define "__GHCIDE__" on CPP (#264)
commita698a6f1d0bca3c593556356ccd09f66f0d16834 authorAlejandro Serrano <trupill@gmail.com> dateTue 17 Dec 2019, 08:10 (7 years ago) parent4440a26
1 file changed+2
src/Development/IDE/GHC/CPP.hs+2
src/Development/IDE/GHC/CPP.hs+2
@@ -114,6 +114,8 @@ doCpp dflags raw input_fn output_fn = do
114114 ++ map SysTools.Option sse_defs
115115 ++ map SysTools.Option avx_defs
116116 ++ mb_macro_include
117+ -- Define a special macro "__GHCIDE__"
118+ ++ [ SysTools.Option "-D__GHCIDE__"]
117119 -- Set the language mode to assembler-with-cpp when preprocessing. This
118120 -- alleviates some of the C99 macro rules relating to whitespace and the hash
119121 -- operator, which we tend to abuse. Clang in particular is not very happy