Skip to content
Snippets Groups Projects
Commit 49c1f88c authored by Matthew Pickering's avatar Matthew Pickering Committed by Ben Gamari
Browse files

Fix hadrian prof flavour so that it builds a profiled version of GHC

In Alp's refactoring of `getProgramContexts` he removed a call to
`getProgramContext` which was where the logic for this used to be
implemented.

Fixes #16214
parent 4d2b804f
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ import Settings ...@@ -13,6 +13,7 @@ import Settings
import Settings.Default import Settings.Default
import Target import Target
import Utilities import Utilities
import Flavour
-- | TODO: Drop code duplication -- | TODO: Drop code duplication
buildProgramRules :: [(Resource, Int)] -> Rules () buildProgramRules :: [(Resource, Int)] -> Rules ()
...@@ -44,12 +45,18 @@ getProgramContexts stage = do ...@@ -44,12 +45,18 @@ getProgramContexts stage = do
-- make sure that we cover these -- make sure that we cover these
-- "prof-build-under-other-name" cases. -- "prof-build-under-other-name" cases.
-- iserv gets its names from Packages.hs:programName -- iserv gets its names from Packages.hs:programName
let allCtxs = [ vanillaContext stage pkg --
profiled <- ghcProfiled <$> flavour
let allCtxs =
if pkg == ghc && profiled && stage > Stage0
then [ Context stage pkg profiling ]
else [ vanillaContext stage pkg
, Context stage pkg profiling , Context stage pkg profiling
-- TODO Dynamic way has been reverted as the dynamic build is -- TODO Dynamic way has been reverted as the dynamic build is
-- broken. See #15837. -- broken. See #15837.
-- , Context stage pkg dynamic -- , Context stage pkg dynamic
] ]
forM allCtxs $ \ctx -> do forM allCtxs $ \ctx -> do
name <- programName ctx name <- programName ctx
return (name <.> exe, ctx) return (name <.> exe, ctx)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment