Skip to content

Commit

Permalink
Add linking libatomic command to build.rs to allow building for riscv…
Browse files Browse the repository at this point in the history
…64gc-unknown-linux-gnu target (#875)
  • Loading branch information
willemolding committed Mar 25, 2024
1 parent 1e45930 commit e9a084e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion librocksdb-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,10 @@ fn build_rocksdb() {
config.flag("-Wno-strict-aliasing");
config.flag("-Wno-invalid-offsetof");
}

if target.contains("riscv64gc") {
// link libatomic required to build for riscv64gc
println!("cargo:rustc-link-lib=atomic");
}
for file in lib_sources {
config.file(format!("rocksdb/{file}"));
}
Expand Down

0 comments on commit e9a084e

Please sign in to comment.