We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b541013 + 446fc23 commit 679b170Copy full SHA for 679b170
libmimalloc-sys/build.rs
@@ -9,6 +9,7 @@ fn main() {
9
10
let target_os = env::var("CARGO_CFG_TARGET_OS").expect("target_os not defined!");
11
let target_family = env::var("CARGO_CFG_TARGET_FAMILY").expect("target_family not defined!");
12
+ let target_arch = env::var("CARGO_CFG_TARGET_ARCH").expect("target_arch not defined!");
13
14
if env::var_os("CARGO_FEATURE_OVERRIDE").is_some() {
15
// Overriding malloc is only available on windows in shared mode, but we
@@ -53,4 +54,9 @@ fn main() {
53
54
}
55
56
build.compile("mimalloc");
57
+
58
+ // on armv6 we need to link with libatomic
59
+ if target_os == "linux" && target_arch == "arm" {
60
+ println!("cargo:rustc-link-lib=dylib=atomic");
61
+ }
62
0 commit comments