summaryrefslogtreecommitdiff
path: root/textproc/difftastic/files/patch-jemalloc
blob: f80eab3f65fa8d0441e564c0b807256c690625d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Upstream has switched from mimalloc to jemalloc in 0.64.0, but
tikv-jemallocator does not currently build on FreeBSD, so just
switch it to system allocator which is jemalloc anyway.
--- Cargo.toml.orig	2025-09-24 03:24:08 UTC
+++ Cargo.toml
@@ -110,7 +110,7 @@ tree-sitter-zig = "1.1.2"
 tree-sitter-yaml = "0.7.0"
 tree-sitter-zig = "1.1.2"
 
-[target.'cfg(not(any(target_env = "msvc", target_os = "illumos")))'.dependencies]
+[target.'cfg(not(any(target_env = "msvc", target_os = "freebsd")))'.dependencies]
 tikv-jemallocator = "0.6"
 
 [dev-dependencies]
--- src/main.rs.orig	2025-09-24 03:24:08 UTC
+++ src/main.rs
@@ -91,10 +91,10 @@ use crate::parse::syntax;
 ///
 /// For reference, Jemalloc uses 10-20% more time (although up to 33%
 /// more instructions) when testing on sample files.
-#[cfg(not(any(target_env = "msvc", target_os = "illumos")))]
+#[cfg(not(any(target_env = "msvc", target_os = "freebsd")))]
 use tikv_jemallocator::Jemalloc;
 
-#[cfg(not(any(target_env = "msvc", target_os = "illumos")))]
+#[cfg(not(any(target_env = "msvc", target_os = "freebsd")))]
 #[global_allocator]
 static GLOBAL: Jemalloc = Jemalloc;