aeb52559906ba73f78fc9086fbabe6a98c43af53
[hadrian.git] / src / Settings / Builders / HsCpp.hs
1 module Settings.Builders.HsCpp (hsCppBuilderArgs) where
2
3 import Settings.Builders.Common
4
5 hsCppBuilderArgs :: Args
6 hsCppBuilderArgs = builder HsCpp ? do
7 stage <- getStage
8 root <- getBuildRoot
9 ghcPath <- expr $ buildPath (vanillaContext stage compiler)
10 mconcat [ getSettingList HsCppArgs
11 , arg "-P"
12 , arg "-Iincludes"
13 , arg $ "-I" ++ root -/- generatedDir
14 , arg $ "-I" ++ ghcPath
15 , arg "-x", arg "c"
16 , arg =<< getInput ]