Skip to content

Commit 44c72c7

Browse files
authored
Merge pull request #136 from nathaniel-daniel/add-windows-libs
2 parents 59d7ee3 + c0ad27d commit 44c72c7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

libmimalloc-sys/build.rs

+10
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,14 @@ fn main() {
6363
let atomic_name = env::var("DEP_ATOMIC").unwrap_or("atomic".to_owned());
6464
println!("cargo:rustc-link-lib={}", atomic_name);
6565
}
66+
67+
// Link with libs needed on Windows
68+
if target_os == "windows" {
69+
// https://github.com/microsoft/mimalloc/blob/af21001f7a65eafb8fb16460b018ebf9d75e2ad8/CMakeLists.txt#L487
70+
let libs = ["psapi", "shell32", "user32", "advapi32", "bcrypt"];
71+
72+
for lib in libs {
73+
println!("cargo:rustc-link-lib={}", lib);
74+
}
75+
}
6676
}

0 commit comments

Comments
 (0)