mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-17 06:06:13 +03:00
folly: enable jemalloc
Folly does take advantage of jemalloc to expand allocations in-place when possible.
This commit is contained in:
parent
512c5114ce
commit
a1ba737c5e
@ -16,6 +16,7 @@
|
||||
, xz
|
||||
, zlib
|
||||
, zstd
|
||||
, jemalloc
|
||||
, follyMobile ? false
|
||||
}:
|
||||
|
||||
@ -50,7 +51,10 @@ stdenv.mkDerivation rec {
|
||||
libunwind
|
||||
fmt_8
|
||||
zstd
|
||||
];
|
||||
] ++ lib.optional stdenv.isLinux jemalloc;
|
||||
|
||||
# jemalloc headers are required in include/folly/portability/Malloc.h
|
||||
propagatedBuildInputs = lib.optional stdenv.isLinux jemalloc;
|
||||
|
||||
NIX_CFLAGS_COMPILE = [ "-DFOLLY_MOBILE=${if follyMobile then "1" else "0"}" "-fpermissive" ];
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
|
Loading…
Reference in New Issue
Block a user