summaryrefslogtreecommitdiff
path: root/hadrian/src/Settings/Builders/HsCpp.hs
blob: 4595e2098e66b89b3884ac219bfec05029b0008b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Settings.Builders.HsCpp (hsCppBuilderArgs) where

import Packages
import Settings.Builders.Common

hsCppBuilderArgs :: Args
hsCppBuilderArgs = builder HsCpp ? do
    stage   <- getStage
    ghcPath <- expr $ buildPath (vanillaContext stage compiler)
    libPath <- expr $ stageLibPath stage
    mconcat [ getSettingList HsCppArgs
            , arg "-P"
            , arg "-Iincludes"
            , arg $ "-I" ++ libPath
            , arg $ "-I" ++ ghcPath
            , arg "-x", arg "c"
            , arg =<< getInput ]