From 499b6c66315227f93aaa4e9b6f93c9f3c8c613b4 Mon Sep 17 00:00:00 2001 From: Mike Jerred Date: Thu, 18 Apr 2024 11:28:42 +0100 Subject: [PATCH] fix: use platform dependant build flags --- bindings/rust/build.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs index 2fff05b..72902b9 100644 --- a/bindings/rust/build.rs +++ b/bindings/rust/build.rs @@ -2,7 +2,11 @@ fn main() { let src_dir = std::path::Path::new("src"); let mut c_config = cc::Build::new(); - c_config.flag("-Wno-unused-parameter"); + if cfg!(windows) { + c_config.flag("/wd4100"); + } else { + c_config.flag("-Wno-unused-parameter"); + } c_config.std("c11").include(src_dir); let parser_path = src_dir.join("parser.c");