GhcCabal.hs 1.02 KB
Newer Older
1
2
3
module Settings.Packages.GhcCabal (ghcCabalPackageArgs) where

import Base
4
5
import GHC
import Oracles.Config.Setting
6
import Predicate
7
8

ghcCabalPackageArgs :: Args
Andrey Mokhov's avatar
Andrey Mokhov committed
9
10
11
12
13
14
ghcCabalPackageArgs = stage0 ? package ghcCabal ? builder Ghc ? do
    -- Note: We could compute 'cabalDeps' instead of hard-coding it but this
    -- seems unnecessary since we plan to drop @ghc-cabal@ altogether, #18.
    win <- lift windowsHost
    let cabalDeps = [ array, base, bytestring, containers, deepseq, directory
                    , pretty, process, time, if win then win32 else unix ]
15
    mconcat
16
        [ append [ "-package " ++ pkgNameString pkg | pkg <- cabalDeps ]
17
        , arg "--make"
18
        , arg "-j"
19
20
21
22
        , arg "-DBOOTSTRAPPING"
        , arg "-DMIN_VERSION_binary_0_8_0"
        , arg "-DGENERICS"
        , arg "-optP-include"
Andrey Mokhov's avatar
Andrey Mokhov committed
23
        , arg $ "-optP" ++ pkgPath ghcCabal -/- "cabal_macros_boot.h"
24
25
26
27
        , arg "-ilibraries/Cabal/Cabal"
        , arg "-ilibraries/binary/src"
        , arg "-ilibraries/filepath"
        , arg "-ilibraries/hpc" ]