make jemalloc stats an optional feature

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-08-18 17:36:33 -04:00 committed by Jason Volk
parent 867050df9e
commit 23690fd837
5 changed files with 20 additions and 5 deletions

View file

@ -57,7 +57,9 @@ rust-jemalloc-sys' = (rust-jemalloc-sys.override {
# we dont need cxx/C++ integration
[ "--disable-cxx" ] ++
# tikv-jemalloc-sys/profiling feature
lib.optional (featureEnabled "jemalloc_prof") "--enable-prof";
lib.optional (featureEnabled "jemalloc_prof") "--enable-prof" ++
# tikv-jemalloc-sys/stats feature
(if (featureEnabled "jemalloc_stats") then [ "--enable-stats" ] else [ "--disable-stats" ]);
});
buildDepsOnlyEnv =