Skip to content

Commit 0ee5617

Browse files
committed
Don't use jemalloc(ator) in unsupported platforms
1 parent d06a9aa commit 0ee5617

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

charabia/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ german-segmentation = []
7979

8080
[dev-dependencies]
8181
criterion = "0.5"
82-
jemallocator = "0.5.4"
8382
quickcheck = "1"
8483
quickcheck_macros = "1"
8584

85+
[target.'cfg(any(all(target_os = "linux", any(target_arch = "x86_64", target_arch = "aarch64", all(target_arch = "powerpc64", target_endian = "little"))), all(target_os = "macos", target_arch = "aarch64")))'.dev-dependencies]
86+
jemallocator = "0.5.4"
8687

8788
[[bench]]
8889
name = "bench"

charabia/benches/bench.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use charabia::{Language, Script, Segment, Tokenize};
22
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
33

4+
#[cfg(any(all(target_os = "linux", any(target_arch = "x86_64", target_arch = "aarch64", all(target_arch = "powerpc64", target_endian = "little"))), all(target_os = "macos", target_arch = "aarch64")))]
45
#[global_allocator]
56
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
67

0 commit comments

Comments
 (0)