diff --git a/Cargo.toml b/Cargo.toml index aa03b4f..bf7cdfd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ unicode-segmentation = "1.11.0" [target.'cfg(any(target_arch = "x86", target_arch = "x86_64", target_arch = "aarch64"))'.dependencies] cpufeatures = "0.2" -[target.'cfg(not(any(target_env = "msvc", target_os = "macos", target_os = "android")))'.dependencies] +[target.'cfg(not(any(target_env = "msvc", target_env = "musl", target_os = "macos", target_os = "android")))'.dependencies] tikv-jemallocator = { version = "0.5", features = ["background_threads", "unprefixed_malloc_on_supported_platforms"] } [target.'cfg(target_os = "macos")'.dependencies] diff --git a/src/main.rs b/src/main.rs index 4019bfa..135ff86 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,12 +43,12 @@ mod rpc; mod server; mod util; -#[cfg(not(any(target_env = "msvc", target_os = "android")))] +#[cfg(not(any(target_env = "msvc", target_env = "musl", target_os = "android")))] #[global_allocator] static ALLOC: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc; // jemalloc config -#[cfg(not(target_env = "msvc"))] +#[cfg(not(any(target_env = "msvc", target_env = "musl")))] #[no_mangle] pub static mut malloc_conf: *const u8 = b"percpu_arena:phycpu,tcache:false,dirty_decay_ms:1000,muzzy_decay_ms:0\0".as_ptr();