Commit a890177c authored by Edward Z. Yang's avatar Edward Z. Yang Committed by GitHub
Browse files

Merge pull request #3829 from ezyang/pr/t3827

Correctly propagate profiling for ALL library dependencies.
parents 2a5e9bc2 a310bf51
......@@ -1573,7 +1573,7 @@ elaborateInstallPlan platform compiler compilerprogdb pkgConfigDB
profLibFlag = lookupPerPkgOption pkgid packageConfigProfLib
--TODO: [code cleanup] unused: the old deprecated packageConfigProfExe
libDepGraph = Graph.fromList (map LibDepSolverPlanPackage
libDepGraph = Graph.fromList (map NonSetupLibDepSolverPlanPackage
(SolverInstallPlan.toList solverPlan))
packagesWithLibDepsDownwardClosedProperty property =
......@@ -1597,20 +1597,21 @@ elaborateInstallPlan platform compiler compilerprogdb pkgConfigDB
-- + ghci or shared lib needed by TH, recursive, ghc version dependent
-- | A newtype for 'SolverInstallPlan.SolverPlanPackage' for which the
-- dependency graph considers only library dependencies (so, no setup
-- dependencies or executable dependencies.) Used to compute the set
-- dependency graph considers only dependencies on libraries which are
-- NOT from setup dependencies. Used to compute the set
-- of packages needed for profiling and dynamic libraries.
newtype LibDepSolverPlanPackage
= LibDepSolverPlanPackage { unLibDepSolverPlanPackage :: SolverInstallPlan.SolverPlanPackage }
instance Package LibDepSolverPlanPackage where
packageId = packageId . unLibDepSolverPlanPackage
instance IsNode LibDepSolverPlanPackage where
type Key LibDepSolverPlanPackage = SolverId
nodeKey = nodeKey . unLibDepSolverPlanPackage
nodeNeighbors (LibDepSolverPlanPackage spkg)
= ordNub $ CD.libraryDeps (resolverPackageLibDeps spkg)
newtype NonSetupLibDepSolverPlanPackage
= NonSetupLibDepSolverPlanPackage
{ unNonSetupLibDepSolverPlanPackage :: SolverInstallPlan.SolverPlanPackage }
instance Package NonSetupLibDepSolverPlanPackage where
packageId = packageId . unNonSetupLibDepSolverPlanPackage
instance IsNode NonSetupLibDepSolverPlanPackage where
type Key NonSetupLibDepSolverPlanPackage = SolverId
nodeKey = nodeKey . unNonSetupLibDepSolverPlanPackage
nodeNeighbors (NonSetupLibDepSolverPlanPackage spkg)
= ordNub $ CD.nonSetupDeps (resolverPackageLibDeps spkg)
-- Build targets
......@@ -144,6 +144,12 @@ Extra-Source-Files:
. ./
cd t3827
cabal new-build exe:q
packages: p q
profiling-detail: all-functions
package q
profiling: True
name: p
version: 1.0
build-type: Simple
cabal-version: >= 1.10
build-depends: base
exposed-modules: P
name: q
version: 1.0
build-type: Simple
cabal-version: >= 1.10
executable q
build-depends: base, p
main-is: Main.hs
Supports Markdown
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