-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix publishing for calyx-lsp (#1948)
* explicitly include tree-sitter files in Cargo.toml for calyx-lsp * please the clippy gods
- Loading branch information
Showing
3 changed files
with
20 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
fn main() { | ||
let language = "calyx"; | ||
let package = format!("tree-sitter-{}", language); | ||
let source_directory = format!("{}/src", package); | ||
let source_file = format!("{}/parser.c", source_directory); | ||
let src_dir = std::path::Path::new("tree-sitter-calyx/src"); | ||
|
||
println!("cargo:rerun-if-changed={}", source_file); | ||
let mut c_config = cc::Build::new(); | ||
c_config.include(src_dir); | ||
c_config | ||
.flag_if_supported("-Wno-unused-parameter") | ||
.flag_if_supported("-Wno-unused-but-set-variable") | ||
.flag_if_supported("-Wno-trigraphs"); | ||
let parser_path = src_dir.join("parser.c"); | ||
c_config.file(&parser_path); | ||
|
||
cc::Build::new() | ||
.file(source_file) | ||
.include(source_directory) | ||
.compile(&package); | ||
c_config.compile("parser"); | ||
println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); | ||
} |
This file was deleted.
Oops, something went wrong.