Skip to content

Commit 828db39

Browse files
aw-server: Disable jemalloc on non-x86 CPUs
jemalloc is only properly tested on x86 on Linux and doesn't even compile for aarch64 it seems. Needed for aw-server to compile for Linux phones such as PinePhone and Librem 5.
1 parent 3b9f31d commit 828db39

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

aw-server/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ aw-query = { path = "../aw-query" }
3838
[target.'cfg(target_os="linux")'.dependencies]
3939
jemallocator = "0.3.2"
4040

41-
[target.'cfg(target_os="android")'.dependencies]
41+
[target.'cfg(all(target_os="android", target_arch="x86"))'.dependencies]
4242
jni = { version = "0.18", default-features = false }
4343
libc = "0.2"
4444
android_logger = "0.9"

aw-server/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ use std::env;
99

1010
use aw_server::*;
1111

12-
#[cfg(target_os = "linux")]
12+
#[cfg(all(target_os = "linux", target_arch = "x86"))]
1313
extern crate jemallocator;
14-
#[cfg(target_os = "linux")]
14+
#[cfg(all(target_os = "linux", target_arch = "x86"))]
1515
#[global_allocator]
1616
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
1717

0 commit comments

Comments
 (0)