Use Cabal directly in place of ghc-cabal + make build root configurable (#531)
[hadrian.git] / src / Settings / Builders / HsCpp.hs
1 module Settings.Builders.HsCpp (hsCppBuilderArgs) where
2
3 import GHC.Packages
4 import Settings.Builders.Common
5
6 hsCppBuilderArgs :: Args
7 hsCppBuilderArgs = builder HsCpp ? do
8 stage <- getStage
9 root <- getBuildRoot
10 ghcPath <- expr $ buildPath (vanillaContext stage compiler)
11 mconcat [ getSettingList HsCppArgs
12 , arg "-P"
13 , arg "-Iincludes"
14 , arg $ "-I" ++ root -/- generatedDir
15 , arg $ "-I" ++ ghcPath
16 , arg "-x", arg "c"
17 , arg =<< getInput ]