diff --git a/apps/oxlint/Cargo.toml b/apps/oxlint/Cargo.toml index 27051b13b..ccd8e4bfd 100644 --- a/apps/oxlint/Cargo.toml +++ b/apps/oxlint/Cargo.toml @@ -24,7 +24,7 @@ path = "src/main.rs" test = false doctest = false -[target.'cfg(not(target_env = "msvc"))'.dependencies] +[target.'cfg(all(not(target_env = "msvc"), not(target_os = "windows")))'.dependencies] jemallocator = { workspace = true, optional = true } [target.'cfg(target_os = "windows")'.dependencies] diff --git a/apps/oxlint/src/main.rs b/apps/oxlint/src/main.rs index 6f531554b..c5f94bfc0 100644 --- a/apps/oxlint/src/main.rs +++ b/apps/oxlint/src/main.rs @@ -1,12 +1,9 @@ -#![cfg(not(miri))] // Miri does not support custom allocators - -#[cfg(feature = "allocator")] -#[cfg(not(target_env = "msvc"))] +// NB: Miri does not support custom allocators +#[cfg(all(feature = "allocator", not(miri), not(target_env = "msvc"), not(target_os = "windows")))] #[global_allocator] static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc; -#[cfg(feature = "allocator")] -#[cfg(target_os = "windows")] +#[cfg(all(feature = "allocator", not(miri), target_os = "windows"))] #[global_allocator] static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;