Guest User

Untitled

a guest
Jan 22nd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. diff --git a/hadrian/src/Rules/Program.hs b/hadrian/src/Rules/Program.hs
  2. index c9df6f5e2d..d7bcb48712 100644
  3. --- a/hadrian/src/Rules/Program.hs
  4. +++ b/hadrian/src/Rules/Program.hs
  5. @@ -13,6 +13,7 @@ import Settings
  6. import Settings.Default
  7. import Target
  8. import Utilities
  9. +import Flavour
  10.  
  11. -- | TODO: Drop code duplication
  12. buildProgramRules :: [(Resource, Int)] -> Rules ()
  13. @@ -44,12 +45,18 @@ getProgramContexts stage = do
  14. -- make sure that we cover these
  15. -- "prof-build-under-other-name" cases.
  16. -- iserv gets its names from Packages.hs:programName
  17. - let allCtxs = [ vanillaContext stage pkg
  18. + --
  19. + profiled <- ghcProfiled <$> flavour
  20. + let allCtxs =
  21. + if pkg == ghc && profiled && stage > Stage0
  22. + then [ Context stage pkg profiling ]
  23. + else [ vanillaContext stage pkg
  24. , Context stage pkg profiling
  25. -- TODO Dynamic way has been reverted as the dynamic build is
  26. -- broken. See #15837.
  27. -- , Context stage pkg dynamic
  28. - ]
  29. + ]
  30. +
  31. forM allCtxs $ \ctx -> do
  32. name <- programName ctx
  33. return (name <.> exe, ctx)
Add Comment
Please, Sign In to add comment