From 9f31286dc3abc77e6a57cc99e9dffe6a3e56ab85 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Wed, 24 Sep 2025 14:23:07 +0300 Subject: [PATCH] Do not use jemalloc on FreeBSD FreeBSD uses jemalloc anyway, and tikv_jemallocator does not build. --- Cargo.toml | 2 +- src/main.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5fc426c92..1ca422bda 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(any(target_env = "msvc", target_os = "illumos")))'.dependencies] +[target.'cfg(not(any(target_env = "msvc", target_os = "illumos", target_os = "freebsd")))'.dependencies] tikv-jemallocator = "0.6" [dev-dependencies] diff --git a/src/main.rs b/src/main.rs index 77927bfbf..d8670fe34 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(any(target_env = "msvc", target_os = "illumos")))] +#[cfg(not(any(target_env = "msvc", target_os = "illumos", target_os = "freebsd")))] use tikv_jemallocator::Jemalloc; -#[cfg(not(any(target_env = "msvc", target_os = "illumos")))] +#[cfg(not(any(target_env = "msvc", target_os = "illumos", target_os = "freebsd")))] #[global_allocator] static GLOBAL: Jemalloc = Jemalloc;