Skip to content

Commit 1677003

Browse files
committed
Make sure we are aware of BOTH build and host compilers.
1 parent 17102ac commit 1677003

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cabal-install/src/Distribution/Client/ProjectPlanning.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,6 @@ rebuildInstallPlan
826826

827827
liftIO $ do
828828
notice verbosity "Resolving dependencies..."
829-
liftIO $ print ("build compiler", compilerId $ toolchainCompiler $ buildToolchain toolchains)
830-
liftIO $ print ("host compiler", compilerId $ toolchainCompiler $ hostToolchain toolchains)
831829
planOrError <-
832830
foldProgress logMsg (pure . Left) (pure . Right) $
833831
planPackages
@@ -991,10 +989,11 @@ rebuildInstallPlan
991989
-> Rebuild ElaboratedInstallPlan
992990
phaseImprovePlan elaboratedPlan elaboratedShared = do
993991
liftIO $ debug verbosity "Improving the install plan..."
994-
storePkgIdSet <- getStoreEntries cabalStoreDirLayout compiler
992+
hstorePkgIdSet <- getStoreEntries cabalStoreDirLayout hcompiler
993+
bstorePkgIdSet <- getStoreEntries cabalStoreDirLayout bcompiler
995994
let improvedPlan =
996995
improveInstallPlanWithInstalledPackages
997-
storePkgIdSet
996+
(hstorePkgIdSet `Set.union` bstorePkgIdSet)
998997
elaboratedPlan
999998
liftIO $ debugNoWrap verbosity (showElaboratedInstallPlan improvedPlan)
1000999
-- TODO: [nice to have] having checked which packages from the store
@@ -1003,7 +1002,8 @@ rebuildInstallPlan
10031002
-- matches up as expected, e.g. no dangling deps, files deleted.
10041003
return improvedPlan
10051004
where
1006-
compiler = toolchainCompiler (hostToolchain (pkgConfigToolchains elaboratedShared))
1005+
hcompiler = toolchainCompiler (hostToolchain (pkgConfigToolchains elaboratedShared))
1006+
bcompiler = toolchainCompiler (buildToolchain (pkgConfigToolchains elaboratedShared))
10071007

10081008
-- | If a 'PackageSpecifier' refers to a single package, return Just that
10091009
-- package.

0 commit comments

Comments
 (0)