da104cc8816d99c70d93a54d63b1b5af3f5185cc
[ghc.git] / src / Settings / Builders / HsCpp.hs
1 module Settings.Builders.HsCpp (hsCppArgs) where
2
3 import Expression
4 import Predicates (builder)
5 import Settings.Builders.GhcCabal
6
7 -- TODO: why process the result with grep -v '^#pragma GCC'? No such lines!
8 hsCppArgs :: Args
9 hsCppArgs = builder HsCpp ? do
10 stage <- getStage
11 src <- getSource
12 mconcat [ arg "-P"
13 , cppArgs
14 , arg $ "-Icompiler/stage" ++ show stage
15 , arg "-x"
16 , arg "c"
17 , arg src ]