diff --git a/napi/minify/Cargo.toml b/napi/minify/Cargo.toml index 28e3d5fafcbba..9d11ed5315583 100644 --- a/napi/minify/Cargo.toml +++ b/napi/minify/Cargo.toml @@ -35,7 +35,7 @@ oxc_span = { workspace = true } napi = { workspace = true } napi-derive = { workspace = true } -[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] +[target.'cfg(target_os = "macos")'.dependencies] mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } [target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] diff --git a/napi/minify/src/lib.rs b/napi/minify/src/lib.rs index 74a679a95d186..c644f625c85f0 100644 --- a/napi/minify/src/lib.rs +++ b/napi/minify/src/lib.rs @@ -2,7 +2,12 @@ #[cfg(all( feature = "allocator", - not(any(target_arch = "arm", target_os = "freebsd", target_family = "wasm")) + not(any( + target_arch = "arm", + target_os = "freebsd", + target_os = "windows", + target_family = "wasm" + )) ))] #[global_allocator] static ALLOC: mimalloc_safe::MiMalloc = mimalloc_safe::MiMalloc; diff --git a/napi/parser/Cargo.toml b/napi/parser/Cargo.toml index 9f8cc849a76bc..42408ff0f239a 100644 --- a/napi/parser/Cargo.toml +++ b/napi/parser/Cargo.toml @@ -32,7 +32,7 @@ rustc-hash = { workspace = true } napi = { workspace = true, features = ["async"] } napi-derive = { workspace = true } -[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] +[target.'cfg(target_os = "macos")'.dependencies] mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } [target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] diff --git a/napi/parser/src/lib.rs b/napi/parser/src/lib.rs index 611c7aac5d3e2..1af37a8002d63 100644 --- a/napi/parser/src/lib.rs +++ b/napi/parser/src/lib.rs @@ -17,7 +17,12 @@ pub use types::*; #[cfg(all( feature = "allocator", - not(any(target_arch = "arm", target_os = "freebsd", target_family = "wasm")) + not(any( + target_arch = "arm", + target_os = "freebsd", + target_os = "windows", + target_family = "wasm" + )) ))] #[global_allocator] static ALLOC: mimalloc_safe::MiMalloc = mimalloc_safe::MiMalloc; diff --git a/napi/transform/Cargo.toml b/napi/transform/Cargo.toml index f863200b15660..6907c75d99190 100644 --- a/napi/transform/Cargo.toml +++ b/napi/transform/Cargo.toml @@ -31,7 +31,7 @@ rustc-hash = { workspace = true } napi = { workspace = true } napi-derive = { workspace = true } -[target.'cfg(not(any(target_os = "linux", target_os = "freebsd", target_arch = "arm", target_family = "wasm")))'.dependencies] +[target.'cfg(target_os = "macos")'.dependencies] mimalloc-safe = { workspace = true, optional = true, features = ["skip_collect_on_exit"] } [target.'cfg(all(target_os = "linux", not(target_arch = "arm"), not(target_arch = "aarch64")))'.dependencies] diff --git a/napi/transform/src/lib.rs b/napi/transform/src/lib.rs index 4b3093d94bfb3..ab3a987ce759b 100644 --- a/napi/transform/src/lib.rs +++ b/napi/transform/src/lib.rs @@ -1,6 +1,11 @@ #[cfg(all( feature = "allocator", - not(any(target_arch = "arm", target_os = "freebsd", target_family = "wasm")) + not(any( + target_arch = "arm", + target_os = "freebsd", + target_os = "windows", + target_family = "wasm" + )) ))] #[global_allocator] static ALLOC: mimalloc_safe::MiMalloc = mimalloc_safe::MiMalloc;