diff --git a/build.rs b/build.rs index 5fa5d408..8736b645 100644 --- a/build.rs +++ b/build.rs @@ -4,14 +4,15 @@ use std::env; use std::path::Path; fn main() { + let mut config = cc::Build::new(); let root_path = Path::new("vendor/tree-sitter"); - let mut config = cc::Build::new(); - config.flag_if_supported("-std=c99"); - config.flag_if_supported("-Wno-unused-parameter"); - config.include(root_path.join(Path::new("src"))); - config.include(root_path.join(Path::new("include"))); - config.include(root_path.join(Path::new("externals/utf8proc"))); + config + .flag("-std=c99") + .flag("-Wno-unused-parameter") + .include(root_path.join(Path::new("src"))) + .include(root_path.join(Path::new("include"))) + .include(root_path.join(Path::new("externals/utf8proc"))); let source_filenames = [ "get_changed_ranges.c", @@ -36,10 +37,10 @@ fn main() { if env::var("RUST_TREE_SITTER_TEST").is_ok() { let parser_dir = Path::new("fixtures/tree-sitter-rust/src"); - config.flag_if_supported("-Wno-typedef-redefinition"); - config.file(parser_dir.join("parser.c")); - config.file(parser_dir.join("scanner.c")); + config + .file(parser_dir.join("parser.c")) + .file(parser_dir.join("scanner.c")); } - config.compile("treesitter") + config.compile("treesitter_ffi"); } diff --git a/vendor/tree-sitter b/vendor/tree-sitter index 5ec3769c..3c01382b 160000 --- a/vendor/tree-sitter +++ b/vendor/tree-sitter @@ -1 +1 @@ -Subproject commit 5ec3769cb4c9acfda64f80d7c14abce939e8b4c5 +Subproject commit 3c01382b95364ce40f0cf9856865a30af77f9690