Skip to content

Commit c1a4101

Browse files
committed
Add a command to explain why -latomic is needed
1 parent 82a94ef commit c1a4101

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

jemalloc-sys/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,8 @@ fn main() {
309309
} else if !target.contains("windows") {
310310
println!("cargo:rustc-link-lib=pthread");
311311
}
312+
// GCC may generate a __atomic_exchange_1 library call which requires -latomic
313+
// during the final linking. https://github.com/riscv-collab/riscv-gcc/issues/12
312314
if target.contains("riscv") {
313315
println!("cargo:rustc-link-lib=atomic");
314316
}

0 commit comments

Comments
 (0)