Skip to content

Commit

Permalink
Don't assume that Windows is building on MSVC
Browse files Browse the repository at this point in the history
The flag /utf-8 is supported by cl.exe, but gcc.exe interprets it as a
non-existent linker script.
  • Loading branch information
Wilfred committed Sep 18, 2022
1 parent 17ec5de commit f71ce08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## 0.37 (unreleased)

### Build

Fixed an issue with building on Windows with gcc.

## 0.36.1 (released 17th September 2022)

Fixed a release script that prevented 0.36.0 from including Windows
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl TreeSitterParser {
}

let mut build = cc::Build::new();
if cfg!(windows) {
if cfg!(target_env = "msvc") {
build.flag("/utf-8");
}
build.include(&dir).warnings(false); // ignore unused parameter warnings
Expand Down

0 comments on commit f71ce08

Please sign in to comment.