summaryrefslogtreecommitdiff
path: root/hadrian/src/Flavour.hs
diff options
context:
space:
mode:
Diffstat (limited to 'hadrian/src/Flavour.hs')
-rw-r--r--hadrian/src/Flavour.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs
index ec9bfa2c5b..7339eb6fb1 100644
--- a/hadrian/src/Flavour.hs
+++ b/hadrian/src/Flavour.hs
@@ -11,6 +11,7 @@ module Flavour
, viaLlvmBackend
, enableProfiledGhc
, disableDynamicGhcPrograms
+ , disableProfiledLibs
) where
import Expression
@@ -90,6 +91,7 @@ flavourTransformers = M.fromList
, "llvm" =: viaLlvmBackend
, "profiled_ghc" =: enableProfiledGhc
, "no_dynamic_ghc" =: disableDynamicGhcPrograms
+ , "no_profiled_libs" =: disableProfiledLibs
]
where (=:) = (,)
@@ -212,3 +214,8 @@ enableProfiledGhc flavour = flavour { ghcProfiled = True }
-- | Disable 'dynamicGhcPrograms'.
disableDynamicGhcPrograms :: Flavour -> Flavour
disableDynamicGhcPrograms flavour = flavour { dynamicGhcPrograms = pure False }
+
+-- | Don't build libraries in profiled 'Way's.
+disableProfiledLibs :: Flavour -> Flavour
+disableProfiledLibs flavour =
+ flavour { libraryWays = filter (not . wayUnit Profiling) <$> libraryWays flavour }