Skip to content

Commit

Permalink
always build grammars with c++ 14
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalkuthe committed Apr 17, 2023
1 parent 1b016a8 commit bf20b98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions helix-loader/src/grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@ fn build_tree_sitter_library(
.args(["/nologo", "/LD", "/I"])
.arg(header_path)
.arg("/Od")
.arg("/utf-8");
.arg("/utf-8")
.arg("/std:c++14")
.arg("/std:c11");
if let Some(scanner_path) = scanner_path.as_ref() {
command.arg(scanner_path);
}
Expand All @@ -471,10 +473,12 @@ fn build_tree_sitter_library(
.arg(header_path)
.arg("-o")
.arg(&library_path)
.arg("-std=c++14")
.arg("-std=c11")
.arg("-O3");
if let Some(scanner_path) = scanner_path.as_ref() {
if scanner_path.extension() == Some("c".as_ref()) {
command.arg("-xc").arg("-std=c99").arg(scanner_path);
command.arg("-xc").arg(scanner_path);
} else {
command.arg(scanner_path);
}
Expand Down

0 comments on commit bf20b98

Please sign in to comment.