diff --git a/apps/oxfmt/src/lib.rs b/apps/oxfmt/src/lib.rs index 733c392a6c6c8..238a0605433ea 100644 --- a/apps/oxfmt/src/lib.rs +++ b/apps/oxfmt/src/lib.rs @@ -9,6 +9,9 @@ pub mod stdin; #[cfg(feature = "napi")] pub use main_napi::*; -#[cfg(all(feature = "allocator", not(miri), not(target_family = "wasm")))] +#[cfg(all( + feature = "allocator", + not(any(target_arch = "arm", miri, target_os = "freebsd", target_family = "wasm")) +))] #[global_allocator] static GLOBAL: mimalloc_safe::MiMalloc = mimalloc_safe::MiMalloc; diff --git a/apps/oxlint/src/lib.rs b/apps/oxlint/src/lib.rs index 4d890e30f52db..2c4744b694f29 100644 --- a/apps/oxlint/src/lib.rs +++ b/apps/oxlint/src/lib.rs @@ -38,6 +38,9 @@ mod js_plugins; // Use Mimalloc as the global allocator if `--features allocator` is enabled. // Mimalloc has better performance, but this is feature-gated because it's slow to compile. // `--features allocator` is only used in release builds. -#[cfg(all(feature = "allocator", not(miri), not(target_family = "wasm")))] +#[cfg(all( + feature = "allocator", + not(any(target_arch = "arm", miri, target_os = "freebsd", target_family = "wasm")) +))] #[global_allocator] static GLOBAL: mimalloc_safe::MiMalloc = mimalloc_safe::MiMalloc;