remove jemalloc support

It's no longer being developed and it is very very annoying to maintain
support for.
This commit is contained in:
Charles Hall 2025-07-21 21:36:42 -07:00
parent 55a01e7113
commit e6dbc293f1
8 changed files with 27 additions and 89 deletions

View file

@ -6,7 +6,6 @@
, pkgsBuildHost
, rocksdb
, rust
, rust-jemalloc-sys
, snappy
, stdenv
@ -35,19 +34,12 @@ let
lib.optionals default-features allDefaultFeatures ++
lib.optionals all-features allFeatures);
featureEnabled = feature : builtins.elem feature features';
buildDepsOnlyEnv =
let
rocksdb' = rocksdb.override {
enableJemalloc = featureEnabled "jemalloc";
};
in
{
NIX_OUTPATH_USED_AS_RANDOM_SEED = "randomseed";
CARGO_PROFILE = profile;
ROCKSDB_INCLUDE_DIR = "${rocksdb'}/include";
ROCKSDB_LIB_DIR = "${rocksdb'}/lib";
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
}
//
(import ./cross-compilation-env.nix {
@ -86,8 +78,6 @@ let
dontStrip = profile != "release";
buildInputs = lib.optional (featureEnabled "jemalloc") rust-jemalloc-sys;
nativeBuildInputs = [
# bindgen needs the build platform's libclang. Apparently due to "splicing
# weirdness", pkgs.rustPlatform.bindgenHook on its own doesn't quite do the

View file

@ -2,10 +2,6 @@
{ inputs
, lib
, rocksdb
, rust-jemalloc-sys
# Options (keep sorted)
, enableJemalloc ? false
}:
let
@ -17,10 +13,7 @@ let
(builtins.readFile ../../../flake.lock)
).nodes.rocksdb.original.ref;
})).override {
jemalloc = rust-jemalloc-sys;
enableLiburing = false;
inherit enableJemalloc;
};
cVersion = rocksdb'.version;

View file

@ -1,12 +0,0 @@
# This derivation will set the JEMALLOC_OVERRIDE variable, causing the
# tikv-jemalloc-sys crate to use the nixpkgs jemalloc instead of building it's
# own. In order for this to work, we need to set flags on the build that match
# whatever flags tikv-jemalloc-sys was going to use. These are dependent on
# which features we enable in tikv-jemalloc-sys.
{ rust-jemalloc-sys }:
rust-jemalloc-sys.override {
# tikv-jemalloc-sys/unprefixed_malloc_on_supported_platforms feature
unprefixed = true;
}