diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-02-16 11:51:37 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-03 08:12:40 -0500 |
commit | e81f2e4e466cfefca9cae425a148030711a5b15f (patch) | |
tree | 54a2c168c466444ceb0dfde06ddf6f803e1c7f46 | |
parent | 8a433a3c883a6fd0a7829abbbd201953c70cd979 (diff) | |
download | haskell-e81f2e4e466cfefca9cae425a148030711a5b15f.tar.gz |
hadrian: Fix profiled flavour transformer
Previously the profiled flavour transformer failed to add the profiled
ways to the library and RTS ways lists, resulting in link failures.
-rw-r--r-- | hadrian/src/Flavour.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs index 3f2b30352e..e07c2e9078 100644 --- a/hadrian/src/Flavour.hs +++ b/hadrian/src/Flavour.hs @@ -208,7 +208,15 @@ viaLlvmBackend = addArgs $ notStage0 ? builder Ghc ? arg "-fllvm" -- that you use this with @'dynamicGhcPrograms' = False@ since GHC does not -- support loading of profiled libraries with the dynamically-linker. enableProfiledGhc :: Flavour -> Flavour -enableProfiledGhc flavour = flavour { ghcProfiled = True } +enableProfiledGhc flavour = + flavour { rtsWays = addWays [profiling, threadedProfiling, debugProfiling, threadedDebugProfiling] (rtsWays flavour) + , libraryWays = addWays [profiling] (libraryWays flavour) + , ghcProfiled = True + } + where + addWays :: [Way] -> Ways -> Ways + addWays ways = + fmap (++ ways) -- | Disable 'dynamicGhcPrograms'. disableDynamicGhcPrograms :: Flavour -> Flavour |