Commit 5f16d41e authored by refold's avatar refold
Browse files

Remove some more uses of buildPlatform.

parent ec3871b3
......@@ -77,7 +77,7 @@ import Distribution.TestSuite
, Test(..) )
import Distribution.Text
import Distribution.Verbosity ( normal, Verbosity )
import Distribution.System ( buildPlatform, Platform )
import Distribution.System ( Platform )
import Control.Exception ( bracket )
import Control.Monad ( when, unless, filterM )
......@@ -107,7 +107,7 @@ localPackageLog :: PD.PackageDescription -> LBI.LocalBuildInfo -> PackageLog
localPackageLog pkg_descr lbi = PackageLog
{ package = PD.package pkg_descr
, compiler = compilerId $ LBI.compiler lbi
, platform = buildPlatform
, platform = LBI.hostPlatform lbi
, testSuites = []
}
......@@ -542,4 +542,3 @@ stubWriteLog f n logs = do
when (suiteError testLog) $ exitWith $ ExitFailure 2
when (suiteFailed testLog) $ exitWith $ ExitFailure 1
exitWith ExitSuccess
......@@ -37,7 +37,7 @@ import Distribution.Simple.Setup
import Distribution.Simple.Utils
( die, notice, debug )
import Distribution.System
( buildPlatform )
( Platform )
import Distribution.Text
( display )
import Distribution.Verbosity
......@@ -66,15 +66,16 @@ fetch :: Verbosity
-> PackageDBStack
-> [Repo]
-> Compiler
-> Platform
-> ProgramConfiguration
-> GlobalFlags
-> FetchFlags
-> [UserTarget]
-> IO ()
fetch verbosity _ _ _ _ _ _ [] =
fetch verbosity _ _ _ _ _ _ _ [] =
notice verbosity "No packages requested. Nothing to do."
fetch verbosity packageDBs repos comp conf
fetch verbosity packageDBs repos comp platform conf
globalFlags fetchFlags userTargets = do
mapM_ checkTarget userTargets
......@@ -88,7 +89,7 @@ fetch verbosity packageDBs repos comp conf
userTargets
pkgs <- planPackages
verbosity comp fetchFlags
verbosity comp platform fetchFlags
installedPkgIndex sourcePkgDb pkgSpecifiers
pkgs' <- filterM (fmap not . isFetched . packageSource) pkgs
......@@ -111,12 +112,13 @@ fetch verbosity packageDBs repos comp conf
planPackages :: Verbosity
-> Compiler
-> Platform
-> FetchFlags
-> PackageIndex
-> SourcePackageDb
-> [PackageSpecifier SourcePackage]
-> IO [SourcePackage]
planPackages verbosity comp fetchFlags
planPackages verbosity comp platform fetchFlags
installedPkgIndex sourcePkgDb pkgSpecifiers
| includeDependencies = do
......@@ -124,7 +126,7 @@ planPackages verbosity comp fetchFlags
notice verbosity "Resolving dependencies..."
installPlan <- foldProgress logMsg die return $
resolveDependencies
buildPlatform (compilerId comp)
platform (compilerId comp)
solver
resolverParams
......
......@@ -501,10 +501,10 @@ fetchAction fetchFlags extraArgs globalFlags = do
config <- loadConfig verbosity (globalConfigFile globalFlags) mempty
let configFlags = savedConfigureFlags config
globalFlags' = savedGlobalFlags config `mappend` globalFlags
(comp, _, conf) <- configCompilerAux' configFlags
(comp, platform, conf) <- configCompilerAux' configFlags
fetch verbosity
(configPackageDB' configFlags) (globalRepos globalFlags')
comp conf globalFlags' fetchFlags
comp platform conf globalFlags' fetchFlags
targets
uploadAction :: UploadFlags -> [String] -> GlobalFlags -> IO ()
......
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