Skip to content

Commit

Permalink
Add a command to explain why -latomic is needed
Browse files Browse the repository at this point in the history
  • Loading branch information
felixonmars committed Sep 14, 2021
1 parent 82a94ef commit c1a4101
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jemalloc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ 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");
}
Expand Down

0 comments on commit c1a4101

Please sign in to comment.