aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/jemalloc
diff options
context:
space:
mode:
authorIzorkin <izorkin@elven.pw>2018-12-02 12:18:22 +0300
committerIzorkin <izorkin@elven.pw>2018-12-02 13:37:14 +0300
commit2489b4a8bfbb38ec53e5c50d8b5ad6fbb0edf830 (patch)
treed0d7006be61935e8ca879f8a080258c40b599e13 /pkgs/development/libraries/jemalloc
parent84162175a3ff1b9649b65b5201c063a51cd40368 (diff)
jemalloc: add option disable-initial-exec-tls
Diffstat (limited to 'pkgs/development/libraries/jemalloc')
-rw-r--r--pkgs/development/libraries/jemalloc/common.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/libraries/jemalloc/common.nix b/pkgs/development/libraries/jemalloc/common.nix
index 5ac1067d92fb..6e83b9637c16 100644
--- a/pkgs/development/libraries/jemalloc/common.nix
+++ b/pkgs/development/libraries/jemalloc/common.nix
@@ -1,11 +1,15 @@
{ version, sha256 }:
-{ stdenv, fetchurl,
+{ stdenv, fetchurl
# By default, jemalloc puts a je_ prefix onto all its symbols on OSX, which
# then stops downstream builds (mariadb in particular) from detecting it. This
# option should remove the prefix and give us a working jemalloc.
# Causes segfaults with some software (ex. rustc), but defaults to true for backward
# compatibility. Ignored on non OSX.
-stripPrefix ? true }:
+, stripPrefix ? true
+, disableInitExecTls ? false
+}:
+
+with stdenv.lib;
stdenv.mkDerivation rec {
name = "jemalloc-${version}";
@@ -17,7 +21,11 @@ stdenv.mkDerivation rec {
};
# see the comment on stripPrefix
- configureFlags = stdenv.lib.optional (stdenv.isDarwin && stripPrefix) "--with-jemalloc-prefix=";
+ configureFlags = []
+ ++ optional (stdenv.isDarwin && stripPrefix) [ "--with-jemalloc-prefix=" ]
+ ++ optional disableInitExecTls [ "--disable-initial-exec-tls" ]
+ ;
+
doCheck = true;
enableParallelBuilding = true;