Skip to content

Commit 679b170

Browse files
authored
Merge pull request #115 from notorca/master
2 parents b541013 + 446fc23 commit 679b170

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libmimalloc-sys/build.rs

+6
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ fn main() {
99

1010
let target_os = env::var("CARGO_CFG_TARGET_OS").expect("target_os not defined!");
1111
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!");
1213

1314
if env::var_os("CARGO_FEATURE_OVERRIDE").is_some() {
1415
// Overriding malloc is only available on windows in shared mode, but we
@@ -53,4 +54,9 @@ fn main() {
5354
}
5455

5556
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+
}
5662
}

0 commit comments

Comments
 (0)