diff --git a/yazi-fm/Cargo.toml b/yazi-fm/Cargo.toml index ef2b5561..07523196 100644 --- a/yazi-fm/Cargo.toml +++ b/yazi-fm/Cargo.toml @@ -37,6 +37,8 @@ tracing-subscriber = "^0" [target."cfg(unix)".dependencies] libc = "^0" signal-hook-tokio = { version = "^0", features = [ "futures-v0_3" ] } + +[target.'cfg(all(not(target_os = "macos"), not(target_os = "windows")))'.dependencies] tikv-jemallocator = "^0" [[bin]] diff --git a/yazi-fm/src/main.rs b/yazi-fm/src/main.rs index f8e54120..f1c0086c 100644 --- a/yazi-fm/src/main.rs +++ b/yazi-fm/src/main.rs @@ -1,7 +1,7 @@ #![allow(clippy::module_inception)] #![allow(clippy::unit_arg)] -#[cfg(unix)] +#[cfg(all(not(target_os = "macos"), not(target_os = "windows")))] #[global_allocator] static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;