diff options
Diffstat (limited to 'src/Settings/Packages/GhcCabal.hs')
-rw-r--r-- | src/Settings/Packages/GhcCabal.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/Settings/Packages/GhcCabal.hs b/src/Settings/Packages/GhcCabal.hs new file mode 100644 index 0000000000..7d2e99e536 --- /dev/null +++ b/src/Settings/Packages/GhcCabal.hs @@ -0,0 +1,24 @@ +module Settings.Packages.GhcCabal (ghcCabalPackageArgs) where + +import Hadrian.Haskell.Cabal + +import Base +import Expression +import Utilities + +ghcCabalPackageArgs :: Args +ghcCabalPackageArgs = stage0 ? package ghcCabal ? builder Ghc ? do + cabalDeps <- expr $ stage1Dependencies cabal + cabalVersion <- expr $ pkgVersion (unsafePkgCabalFile cabal) -- TODO: improve + mconcat + [ pure [ "-package " ++ pkgName pkg | pkg <- cabalDeps, pkg /= parsec ] + , arg "--make" + , arg "-j" + , pure ["-Wall", "-fno-warn-unused-imports", "-fno-warn-warnings-deprecations"] + , arg ("-DCABAL_VERSION=" ++ replace "." "," cabalVersion) + , arg "-DBOOTSTRAPPING" + , arg "-DMIN_VERSION_binary_0_8_0" + , arg "-ilibraries/Cabal/Cabal" + , arg "-ilibraries/binary/src" + , arg "-ilibraries/filepath" + , arg "-ilibraries/hpc" ] |