From 776cb070239a4e11ae7e1fa97c02829db03994ea Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sun, 2 Nov 2025 02:33:53 +0100 Subject: [PATCH] Use system jemalloc The version compiled by tikv_jemallocator by default assumes 16K pages, and doesn't work on systems which have 64K pages. Link the system jemalloc to ensure we ruff always uses a compatible jemalloc which aligns with local system conventions. --- .cargo/config.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index f7d8e616f8..c1bdfa1be7 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -8,3 +8,7 @@ benchmark = "bench -p ruff_benchmark --bench linter --bench formatter --" # See: https://github.com/astral-sh/ruff/issues/11503 [target.'cfg(all(target_env="msvc", target_os = "windows"))'] rustflags = ["-C", "target-feature=+crt-static"] + +# Use system jemalloc (which may or may not be compiled for 64K pages). +[target.'cfg(all(target_env = "musl", target_os = "linux"))'.jemalloc] +rustc-link-lib = ["jemalloc"]