From d6ab90d840d220d16209e71e9559b10bde2c86a3 Mon Sep 17 00:00:00 2001 From: Dan Cross Date: Tue, 16 Sep 2025 17:47:49 +0000 Subject: [PATCH] Do not use jemalloc on illumos jemalloc does not work on illumos; it's use is already conditional on environments that are not msvc, so extend the conditionals involved to also exclude illumos. --- Cargo.toml | 2 +- src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9e5886b8f..b34613da1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -110,7 +110,7 @@ tree-sitter-xml = "0.7.0" tree-sitter-yaml = "0.7.0" tree-sitter-zig = "1.1.2" -[target.'cfg(not(target_env = "msvc"))'.dependencies] +[target.'cfg(not(any(target_env = "msvc", target_os = "illumos")))'.dependencies] tikv-jemallocator = "0.6" [dev-dependencies] diff --git a/src/main.rs b/src/main.rs index 3e238c887..c5818a187 100644 --- a/src/main.rs +++ b/src/main.rs @@ -91,10 +91,10 @@ use crate::parse::syntax; /// /// For reference, Jemalloc uses 10-20% more time (although up to 33% /// more instructions) when testing on sample files. -#[cfg(not(target_env = "msvc"))] +#[cfg(not(any(target_env = "msvc", target_os = "illumos")))] use tikv_jemallocator::Jemalloc; -#[cfg(not(target_env = "msvc"))] +#[cfg(not(any(target_env = "msvc", target_os = "illumos")))] #[global_allocator] static GLOBAL: Jemalloc = Jemalloc;