From 47991ccd6fd1903be264d1c14d3f6b9030c26fa5 Mon Sep 17 00:00:00 2001 From: Shirayama Kazatsuyu Date: Thu, 1 Feb 2024 03:13:21 +0900 Subject: [PATCH] Enable build by msvc --- binding.gyp | 9 ++++++++- bindings/rust/build.rs | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/binding.gyp b/binding.gyp index 26d1901c..987b403b 100644 --- a/binding.gyp +++ b/binding.gyp @@ -14,7 +14,14 @@ ], "cflags_c": [ "-std=c99", - ] + ], + "msvs_settings": { + "VCCLCompilerTool": { + "AdditionalOptions": [ + '-utf-8' + ], + }, + }, } ] } diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs index f7aaf166..41d45593 100644 --- a/bindings/rust/build.rs +++ b/bindings/rust/build.rs @@ -6,7 +6,8 @@ fn main() { c_config .flag_if_supported("-Wno-unused-parameter") .flag_if_supported("-Wno-unused-but-set-variable") - .flag_if_supported("-Wno-trigraphs"); + .flag_if_supported("-Wno-trigraphs") + .flag_if_supported("-utf-8"); let parser_path = src_dir.join("parser.c"); c_config.file(&parser_path);