Implement buildPackageData rule.
[hadrian.git] / src / Settings.hs
1 {-# LANGUAGE NoImplicitPrelude, FlexibleInstances #-}
2
3 module Settings (
4 buildSettings
5 ) where
6
7 import Base hiding (arg, args, Args)
8 import Rules.Data
9 import Switches
10 import Oracles.Builder
11 import Expression.Base
12
13 buildSettings :: Settings
14 buildSettings = msum
15 [ builder GhcCabal ? cabalSettings
16 , stagedBuilder GhcPkg ? ghcPkgSettings ]
17
18 packageSettings :: Settings
19 packageSettings = msum
20 [ args ["-hide-all-packages", "-no-user-package-db", "-include-pkg-deps"]
21 , stage Stage0 ?
22 (arg "-package-db" |> argPath "libraries/bootstrapping.conf")
23 , supportsPackageKey && notStage Stage0 ??
24 ( argPairs "-this-package-key" argPackageKey <|>
25 argPairs "-package-key" argPackageDepKeys
26 , argPairs "-package-name" argPackageKey <|>
27 argPairs "-package" argPackageDeps )]