diff --git a/benches/roundtrip.rs b/benches/roundtrip.rs index 6dfa36226..767abe8d4 100644 --- a/benches/roundtrip.rs +++ b/benches/roundtrip.rs @@ -32,6 +32,7 @@ const MIN_ALIGN: usize = 8; target_arch = "powerpc64", target_arch = "powerpc64le", target_arch = "mips64", + target_arch = "riscv64", target_arch = "s390x", target_arch = "sparc64" )))] diff --git a/jemalloc-sys/build.rs b/jemalloc-sys/build.rs index 95d143784..a4c244cef 100644 --- a/jemalloc-sys/build.rs +++ b/jemalloc-sys/build.rs @@ -309,6 +309,9 @@ fn main() { } else if !target.contains("windows") { println!("cargo:rustc-link-lib=pthread"); } + if target.contains("riscv") { + println!("cargo:rustc-link-lib=atomic"); + } println!("cargo:rerun-if-changed=jemalloc"); } diff --git a/src/lib.rs b/src/lib.rs index 5c53285c9..bea6cafc5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,6 +54,7 @@ const ALIGNOF_MAX_ALIGN_T: usize = 8; target_arch = "powerpc64", target_arch = "powerpc64le", target_arch = "mips64", + target_arch = "riscv64", target_arch = "s390x", target_arch = "sparc64" )))]