Commit 1ee62bf5 authored by Andrey Mokhov's avatar Andrey Mokhov

Fix redundant import, minor revision

parent a161b8ee
...@@ -11,8 +11,7 @@ module Settings.Builders.Common ( ...@@ -11,8 +11,7 @@ module Settings.Builders.Common (
import Base import Base
import Expression import Expression
import GHC.Packages import Hadrian.Haskell.Cabal.PackageData
import Hadrian.Haskell.Cabal.PackageData as PD
import Oracles.Flag import Oracles.Flag
import Oracles.Setting import Oracles.Setting
import Settings import Settings
...@@ -23,22 +22,21 @@ cIncludeArgs = do ...@@ -23,22 +22,21 @@ cIncludeArgs = do
pkg <- getPackage pkg <- getPackage
root <- getBuildRoot root <- getBuildRoot
path <- getBuildPath path <- getBuildPath
incDirs <- getPackageData PD.includeDirs incDirs <- getPackageData includeDirs
depDirs <- getPackageData PD.depIncludeDirs depDirs <- getPackageData depIncludeDirs
iconvIncludeDir <- getSetting IconvIncludeDir iconvIncludeDir <- getSetting IconvIncludeDir
gmpIncludeDir <- getSetting GmpIncludeDir gmpIncludeDir <- getSetting GmpIncludeDir
ffiIncludeDir <- getSetting FfiIncludeDir ffiIncludeDir <- getSetting FfiIncludeDir
mconcat [ arg "-Iincludes" mconcat [ arg "-Iincludes"
, arg $ "-I" ++ root -/- generatedDir , arg $ "-I" ++ root -/- generatedDir
, arg $ "-I" ++ path , arg $ "-I" ++ path
, pure . map ("-I"++) . filter (/= "") $ [iconvIncludeDir, gmpIncludeDir] , pure . map ("-I"++) . filter (/= "") $ [iconvIncludeDir, gmpIncludeDir]
, flag UseSystemFfi ? arg ("-I" ++ ffiIncludeDir) , flag UseSystemFfi ? arg ("-I" ++ ffiIncludeDir)
-- add the build path with include dirs in case we generated -- Add @incDirs@ in the build directory, since some files generated
-- some files with autoconf, which will end up in the build directory. -- with @autoconf@ may end up in the build directory.
, pure [ "-I" ++ path -/- dir | dir <- incDirs ] , pure [ "-I" ++ path -/- dir | dir <- incDirs ]
-- add the package directory with include dirs, for includes -- Add @incDirs@ in the package directory for include files shipped
-- shipped with the package -- with the package.
, pure [ "-I" ++ pkgPath pkg -/- dir | dir <- incDirs ] , pure [ "-I" ++ pkgPath pkg -/- dir | dir <- incDirs ]
, pure [ "-I" ++ unifyPath dir | dir <- depDirs ] ] , pure [ "-I" ++ unifyPath dir | dir <- depDirs ] ]
...@@ -58,12 +56,12 @@ cWarnings = mconcat ...@@ -58,12 +56,12 @@ cWarnings = mconcat
packageDatabaseArgs :: Args packageDatabaseArgs :: Args
packageDatabaseArgs = do packageDatabaseArgs = do
stage <- getStage stage <- getStage
dbPath <- expr (packageDbPath stage) dbPath <- expr (packageDbPath stage)
expr (need [dbPath -/- packageDbStamp]) expr (need [dbPath -/- packageDbStamp])
root <- getBuildRoot root <- getBuildRoot
prefix <- ifM (builder Ghc) (return "-package-db ") (return "--package-db=") prefix <- ifM (builder Ghc) (return "-package-db ") (return "--package-db=")
arg $ prefix ++ root -/- relativePackageDbPath stage arg $ prefix ++ root -/- relativePackageDbPath stage
bootPackageDatabaseArgs :: Args bootPackageDatabaseArgs :: Args
bootPackageDatabaseArgs = do bootPackageDatabaseArgs = do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment