a7936e946dd87ba8d54fb5f35ed21a796b1cf78b
[hadrian.git] / src / Settings / Packages / Ghc.hs
1 module Settings.Packages.Ghc (ghcPackageArgs) where
2
3 import Expression
4 import GHC (ghc, compiler)
5 import Oracles.Config.Setting
6 import Predicates (builder, builderGhc, package, notStage0)
7 import Settings.Paths
8
9 ghcPackageArgs :: Args
10 ghcPackageArgs = package ghc ? do
11 stage <- getStage
12 mconcat [ builderGhc ? mconcat
13 [ arg $ "-I" ++ targetPath stage compiler
14 , arg "-no-hs-main" ]
15
16 , builder GhcCabal ?
17 ghcWithInterpreter ? notStage0 ? arg "--flags=ghci" ]