Skip to content

Commit

Permalink
Add riscv64 support (#14)
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Yan <felixonmars@archlinux.org>
  • Loading branch information
felixonmars authored Sep 17, 2021
1 parent 2d242ee commit 52de425
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions benches/roundtrip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)))]
Expand Down
5 changes: 5 additions & 0 deletions jemalloc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,11 @@ fn main() {
} else if !target.contains("windows") {
println!("cargo:rustc-link-lib=pthread");
}
// GCC may generate a __atomic_exchange_1 library call which requires -latomic
// during the final linking. https://github.com/riscv-collab/riscv-gcc/issues/12
if target.contains("riscv") {
println!("cargo:rustc-link-lib=atomic");
}
println!("cargo:rerun-if-changed=jemalloc");
}

Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)))]
Expand Down

0 comments on commit 52de425

Please sign in to comment.