mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:24 +00:00
Re-enable custom allocators (#2876)
This commit is contained in:
parent
6d1adc85fc
commit
2bf7b35268
3 changed files with 66 additions and 5 deletions
|
@ -65,3 +65,9 @@ ureq = { version = "2.5.0", features = [] }
|
|||
|
||||
[package.metadata.maturin]
|
||||
name = "ruff"
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
mimalloc = "0.1.29"
|
||||
|
||||
[target.'cfg(all(not(windows), any(target_arch = "x86_64", target_arch = "aarch64", target_arch = "powerpc64")))'.dependencies]
|
||||
tikv-jemallocator = "0.5.0"
|
||||
|
|
|
@ -24,6 +24,21 @@ mod iterators;
|
|||
mod printer;
|
||||
mod resolve;
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
#[global_allocator]
|
||||
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
|
||||
|
||||
#[cfg(all(
|
||||
not(target_os = "windows"),
|
||||
any(
|
||||
target_arch = "x86_64",
|
||||
target_arch = "aarch64",
|
||||
target_arch = "powerpc64"
|
||||
)
|
||||
))]
|
||||
#[global_allocator]
|
||||
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;
|
||||
|
||||
enum ExitStatus {
|
||||
/// Linting was successful and there were no linting errors.
|
||||
Success,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue