gate jemalloc behind musl

This commit is contained in:
Robin Appelman 2025-03-25 23:40:08 +01:00
commit c1200c5676
3 changed files with 5 additions and 4 deletions

3
.gitignore vendored
View file

@ -3,4 +3,5 @@ target
.env .env
result result
*.log *.log
profile.json profile.json
*.out.*

View file

@ -31,7 +31,7 @@ ruzstd = "0.8.0"
dialoguer = "0.11.0" dialoguer = "0.11.0"
indicatif = { version = "0.17.11", features = ["rayon"] } indicatif = { version = "0.17.11", features = ["rayon"] }
[target.'cfg(not(target_os = "windows"))'.dependencies] [target.'cfg(target_env = "musl")'.dependencies]
tikv-jemallocator = "0.6.0" tikv-jemallocator = "0.6.0"
[profile.dev.package."*"] [profile.dev.package."*"]

View file

@ -23,11 +23,11 @@ mod matcher;
mod timegraph; mod timegraph;
mod ui; mod ui;
#[cfg(not(target_os = "windows"))] #[cfg(target_env = "musl")]
use tikv_jemallocator::Jemalloc; use tikv_jemallocator::Jemalloc;
use time::format_description::{parse_owned, parse_strftime_owned}; use time::format_description::{parse_owned, parse_strftime_owned};
#[cfg(not(target_os = "windows"))] #[cfg(target_env = "musl")]
#[global_allocator] #[global_allocator]
static GLOBAL: Jemalloc = Jemalloc; static GLOBAL: Jemalloc = Jemalloc;