We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 880fd1f commit e638bd6Copy full SHA for e638bd6
libmimalloc-sys/build.rs
@@ -57,6 +57,10 @@ fn main() {
57
58
// on armv6 we need to link with libatomic
59
if target_os == "linux" && target_arch == "arm" {
60
- println!("cargo:rustc-link-lib=atomic");
+ // Embrace the atomic capability library across various platforms.
61
+ // For instance, on certain platforms, llvm has relocated the atomic of the arm32 architecture to libclang_rt.builtins.a
62
+ // while some use libatomic.a, and others use libatomic_ops.a.
63
+ let atomic_name = env::var("DEP_ATOMIC").unwrap_or("atomic".to_owned());
64
+ println!("cargo:rustc-link-lib={}", atomic_name);
65
}
66
0 commit comments