mirror of
https://github.com/danbulant/oxc
synced 2026-05-20 12:48:38 +00:00
fix(oxlint): gate custom allocators by feature flag (#3945)
This tweaks the conditional compilation of custom allocators by wiring the dedicated Cargo feature flag `allocator` to the source code. It ensures that allocator gating is directly checking the relevant feature instead of trying to infer it from the build profile.
This commit is contained in:
parent
94329e4c66
commit
750cb43624
1 changed files with 2 additions and 2 deletions
|
|
@ -1,11 +1,11 @@
|
|||
#![cfg(not(miri))] // Miri does not support custom allocators
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(feature = "allocator")]
|
||||
#[cfg(not(target_env = "msvc"))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: jemallocator::Jemalloc = jemallocator::Jemalloc;
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(feature = "allocator")]
|
||||
#[cfg(target_os = "windows")]
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue