summary refs log tree commit diff
path: root/pkgs/development/compilers/ghc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2018-08-16 10:00:32 -0400
committerShea Levy <shea@shealevy.com>2018-08-16 11:37:24 -0400
commit429131ac79a2677342646828ec1b36503180f88f (patch)
tree0658604f47a3587c25346cc5dcb60fcafc9b2cd1 /pkgs/development/compilers/ghc
parent6f8fe25ccfb138d716d3b1c0cea25e6f11208d45 (diff)
downloadnixlib-429131ac79a2677342646828ec1b36503180f88f.tar
nixlib-429131ac79a2677342646828ec1b36503180f88f.tar.gz
nixlib-429131ac79a2677342646828ec1b36503180f88f.tar.bz2
nixlib-429131ac79a2677342646828ec1b36503180f88f.tar.lz
nixlib-429131ac79a2677342646828ec1b36503180f88f.tar.xz
nixlib-429131ac79a2677342646828ec1b36503180f88f.tar.zst
nixlib-429131ac79a2677342646828ec1b36503180f88f.zip
Add back (optional) deterministic profiling patch for GHC 8.4
Diffstat (limited to 'pkgs/development/compilers/ghc')
-rw-r--r--pkgs/development/compilers/ghc/8.4.3.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/development/compilers/ghc/8.4.3.nix b/pkgs/development/compilers/ghc/8.4.3.nix
index 7be209aa5fac..3f1f539cab78 100644
--- a/pkgs/development/compilers/ghc/8.4.3.nix
+++ b/pkgs/development/compilers/ghc/8.4.3.nix
@@ -30,6 +30,10 @@
 , # What flavour to build. An empty string indicates no
   # specific flavour and falls back to ghc default values.
   ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
+, # Whether to backport https://phabricator.haskell.org/D4388 for
+  # deterministic profiling symbol names, at the cost of a slightly
+  # non-standard GHC API
+  deterministicProfiling ? false
 }:
 
 assert !enableIntegerSimple -> gmp != null;
@@ -94,7 +98,11 @@ stdenv.mkDerivation (rec {
     sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3";
     extraPrefix = "utils/hsc2hs/";
     stripLen = 1;
-  })]
+  })] ++ stdenv.lib.optional deterministicProfiling
+    (fetchpatch {
+      url = "https://phabricator-files.haskell.org/file/data/yd2fclrwulila2quki5q/PHID-FILE-lr2j63hkglwauprxycrt/D4388.diff";
+      sha256 = "0w6sdcvnqjlnlzpvnzw20b80v150ijjyjvs9548ildc1928j0w7s";
+    })
     ++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch;
 
   postPatch = "patchShebangs .";