Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kirawi committed Jul 15, 2021
1 parent 5ac6b38 commit 16e4292
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions helix-syntax/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ fn build_library(src_path: &Path, language: &str) -> Result<()> {
if !recompile {
return Ok(());
}
let build_dir = std::env::var("OUT_DIR").unwrap();
let mut config = cc::Build::new();
config.cpp(true).opt_level(2).cargo_metadata(false);
let compiler = config.get_compiler();
let mut command = Command::new(compiler.path());
command.current_dir(Path::new(&build_dir).join(src_path));
command.current_dir(src_path);
for (key, value) in compiler.env() {
command.env(key, value);
}
Expand Down Expand Up @@ -199,4 +198,4 @@ fn main() {

build_dir("tree-sitter-typescript/tsx", "tsx");
build_dir("tree-sitter-typescript/typescript", "typescript");
}
}

0 comments on commit 16e4292

Please sign in to comment.