Skip to content

Commit

Permalink
always build grammars with c++14 and c11
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalkuthe committed Apr 17, 2023
1 parent 1b016a8 commit 11dea39
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 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 @@ -474,12 +476,12 @@ fn build_tree_sitter_library(
.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("-std=c11").arg(scanner_path);
} else {
command.arg(scanner_path);
command.arg("-std=c++14").arg(scanner_path);
}
}
command.arg("-xc").arg(parser_path);
command.arg("-xc").arg("-std=c11").arg(parser_path);
if cfg!(all(
unix,
not(any(target_os = "macos", target_os = "illumos"))
Expand Down

0 comments on commit 11dea39

Please sign in to comment.