Skip to content

Commit 7b45056

Browse files
author
reigadegr
committed
fix: Windows build failure caused by -Wno-error=date-time
1 parent 9c47102 commit 7b45056

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libmimalloc-sys/build.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ fn main() {
66
build.include("c_src/mimalloc/include");
77
build.include("c_src/mimalloc/src");
88
build.file("c_src/mimalloc/src/static.c");
9-
build.flag("-Wno-error=date-time");
109

1110
let target_os = env::var("CARGO_CFG_TARGET_OS").expect("target_os not defined!");
1211
let target_family = env::var("CARGO_CFG_TARGET_FAMILY").expect("target_family not defined!");
1312
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").expect("target_arch not defined!");
1413

14+
if target_family != "windows" {
15+
build.flag("-Wno-error=date-time");
16+
}
17+
1518
if env::var_os("CARGO_FEATURE_OVERRIDE").is_some() {
1619
// Overriding malloc is only available on windows in shared mode, but we
1720
// only ever build a static lib.

0 commit comments

Comments
 (0)