From 6bc08863a5e25956d6c20ca4e9605e99c49268da Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Fri, 11 Feb 2022 15:07:01 +0000 Subject: hadrian: Enable late-ccs when building profiled_ghc --- hadrian/src/Flavour.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs index c46f77a2fb..5268815f5a 100644 --- a/hadrian/src/Flavour.hs +++ b/hadrian/src/Flavour.hs @@ -165,7 +165,7 @@ viaLlvmBackend = addArgs $ notStage0 ? builder Ghc ? arg "-fllvm" -- support loading of profiled libraries with the dynamically-linker. enableProfiledGhc :: Flavour -> Flavour enableProfiledGhc flavour = - flavour { rtsWays = addWays [profiling, threadedProfiling, debugProfiling, threadedDebugProfiling] (rtsWays flavour) + enableLateCCS flavour { rtsWays = addWays [profiling, threadedProfiling, debugProfiling, threadedDebugProfiling] (rtsWays flavour) , libraryWays = addWays [profiling] (libraryWays flavour) , ghcProfiled = True } @@ -204,6 +204,12 @@ enableIPE = Right transformer = applySetting kv in transformer +enableLateCCS :: Flavour -> Flavour +enableLateCCS = + let Right kv = parseKV "stage1.*.ghc.hs.opts += -fprof-late-ccs" + Right transformer = applySetting kv + in transformer + -- | Produce fully statically-linked executables and build libraries suitable -- for static linking. fullyStatic :: Flavour -> Flavour -- cgit v1.2.1