Skip to content

Commit 5271726

Browse files
Merge pull request #16 from perplexityai/try-disabling-jemalloc
Disable jemalloc on ARM64 to fix cross-compilation crash
2 parents 5b03881 + bca73ec commit 5271726

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ extern crate tokio_rustls;
3737
extern crate toml;
3838
extern crate trust_dns_resolver;
3939

40-
#[cfg(not(target_env = "msvc"))]
40+
// Only use jemalloc on x86_64 - it has issues on ARM64 when cross-compiled with zig
41+
#[cfg(all(not(target_env = "msvc"), target_arch = "x86_64"))]
4142
use jemallocator::Jemalloc;
4243

43-
#[cfg(not(target_env = "msvc"))]
44+
#[cfg(all(not(target_env = "msvc"), target_arch = "x86_64"))]
4445
#[global_allocator]
4546
static GLOBAL: Jemalloc = Jemalloc;
4647

0 commit comments

Comments
 (0)