Skip to content

Commit 8131d10

Browse files
committed
Add patch
1 parent 2d9c04a commit 8131d10

2 files changed

Lines changed: 14 additions & 17 deletions

File tree

nix/profiled-ghc-964.patch

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs
2+
index a281a2401a..da513a70e8 100644
3+
--- a/hadrian/src/Flavour.hs
4+
+++ b/hadrian/src/Flavour.hs
5+
@@ -221,7 +221,7 @@ viaLlvmBackend = addArgs $ notStage0 ? builder Ghc ? arg "-fllvm"
6+
-- dynamically-linker.
7+
enableProfiledGhc :: Flavour -> Flavour
8+
enableProfiledGhc flavour =
9+
- enableLateCCS flavour { rtsWays = do
10+
+ flavour { rtsWays = do
11+
ws <- rtsWays flavour
12+
pure $ (Set.map (\w -> if wayUnit Dynamic w then w else w <> profiling) ws) <> ws
13+
, libraryWays = (Set.singleton profiling <>) <$> (libraryWays flavour)

nix/project.nix

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,7 @@ let
2323
ghc96-plugin = {
2424
ghcOverride = pkgs.haskell-nix.compiler.ghc967.override {
2525
extraFlavourTransformers = [ "+profiled_ghc+no_dynamic_ghc" ];
26-
ghc-patches = [
27-
''
28-
diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs
29-
index a281a2401a..da513a70e8 100644
30-
--- a/hadrian/src/Flavour.hs
31-
+++ b/hadrian/src/Flavour.hs
32-
@@ -221,7 +221,7 @@ viaLlvmBackend = addArgs $ notStage0 ? builder Ghc ? arg "-fllvm"
33-
-- dynamically-linker.
34-
enableProfiledGhc :: Flavour -> Flavour
35-
enableProfiledGhc flavour =
36-
- enableLateCCS flavour { rtsWays = do
37-
+ flavour { rtsWays = do
38-
ws <- rtsWays flavour
39-
pure $ (Set.map (\w -> if wayUnit Dynamic w then w else w <> profiling) ws) <> ws
40-
, libraryWays = (Set.singleton profiling <>) <$> (libraryWays flavour)
41-
''
42-
];
26+
ghc-patches = [ ./profiled-ghc-964.patch ];
4327
};
4428
modules = [{
4529
enableProfiling = true;

0 commit comments

Comments
 (0)