X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FDriverPipeline.hs;h=0673abb9dcb3d656703c250f002f29c74443d385;hb=e3d95da870e58a799d8db4079192ba2471d7853d;hp=81c2f4698cc8b7bfcb378786e897f2507f780b82;hpb=d6174f50acdbc2197e81351e334317d0742f74f2;p=ghc-hetmet.git diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index 81c2f46..0673abb 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -1167,11 +1167,16 @@ doCpp raw include_cc_opts input_fn output_fn = do let cpp_prog args | raw = SysTools.runCpp args | otherwise = SysTools.runCc (SysTools.Option "-E" : args) + let target_defs = + [ "-D" ++ cTARGETOS ++ "_TARGET_OS=1", + "-D" ++ cTARGETARCH ++ "_TARGET_ARCH=1" ] + cpp_prog ([SysTools.Option verb] ++ map SysTools.Option include_paths ++ map SysTools.Option hsSourceCppOpts ++ map SysTools.Option hscpp_opts ++ map SysTools.Option cc_opts + ++ map SysTools.Option target_defs ++ [ SysTools.Option "-x" , SysTools.Option "c" , SysTools.Option input_fn