Use jemalloc for Linux musl binaries (#42850)

## What changed

- Configure the CLI and app server to use `tikv-jemallocator` on
  `x86_64-unknown-linux-musl` and `aarch64-unknown-linux-musl`.
- Keep the dependency and global allocator selection scoped to those targets.

GitOrigin-RevId: 93c54c90d9acb7e48edffd032cd8ec685a782210
This commit is contained in:
efrazer-oai
2026-09-04 20:48:16 +00:00
committed by copyberry
parent 7a8092a447
commit 8e4b7d31de
7 changed files with 47 additions and 0 deletions
+8
View File
@@ -46,6 +46,14 @@ use std::path::PathBuf;
use std::sync::Arc;
use supports_color::Stream;
#[cfg(all(
target_os = "linux",
target_env = "musl",
any(target_arch = "x86_64", target_arch = "aarch64")
))]
#[global_allocator]
static ALLOCATOR: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
#[cfg(any(target_os = "macos", target_os = "windows"))]
mod app_cmd;
mod cloud_config;