File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
cabal-install-solver/src/Distribution/Solver Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ import Distribution.Solver.Types.PackagePreferences
2424import Distribution.Solver.Types.PkgConfigDb (PkgConfigDb )
2525import Distribution.Solver.Types.LabeledPackageConstraint
2626import Distribution.Solver.Types.Settings
27- import Distribution.Solver.Types.Toolchain ( Toolchains (.. ), Toolchain (.. ) )
27+ import Distribution.Solver.Types.Toolchain ( Toolchains (.. ), Toolchain (.. ), buildIsHost )
2828import Distribution.Solver.Types.Variable
2929
3030import Distribution.Solver.Modular.Assignment
@@ -114,7 +114,7 @@ solve sc toolchains idx pkgConfigDB userPrefs userConstraints userGoals =
114114 validationCata .
115115 traceTree " pruned.json" id .
116116 trav prunePhase .
117- trav P. pruneHostFromSetup .
117+ ( if buildIsHost toolchains then id else trav P. pruneHostFromSetup) .
118118 -- stageBuildDeps "build: " .
119119 traceTree " build.json" id $
120120 buildPhase
Original file line number Diff line number Diff line change 11{-# LANGUAGE DeriveGeneric #-}
2+ {-# LANGUAGE NamedFieldPuns #-}
23
34module Distribution.Solver.Types.Toolchain
45 ( Toolchain (.. )
56 , Toolchains (.. )
67 , toolchainFor
78 , mkToolchainsWithHost
9+ , buildIsHost
810 ) where
911
1012import Distribution.Compat.Prelude
@@ -55,3 +57,7 @@ mkToolchainsWithHost platform compiler =
5557 { buildToolchain = Toolchain platform compiler (error " build program db missing" )
5658 , hostToolchain = Toolchain platform compiler (error " host program db missing" )
5759 }
60+
61+ buildIsHost :: Toolchains -> Bool
62+ buildIsHost Toolchains {buildToolchain, hostToolchain} =
63+ buildToolchain == hostToolchain
You can’t perform that action at this time.
0 commit comments