Skip to content

Commit

Permalink
Build each grammar in it's own src dir
Browse files Browse the repository at this point in the history
Windows places temporary files in the current dir, so compiling in
parallel caused conflicts.
  • Loading branch information
archseer committed Jul 12, 2021
1 parent 39318de commit 7fa9eea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions helix-syntax/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,13 @@ 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);
// .target(BUILD_TARGET)
// .host(BUILD_TARGET);
let compiler = config.get_compiler();
let mut command = Command::new(compiler.path());
command.current_dir(build_dir);
command.current_dir(src_path);
for (key, value) in compiler.env() {
command.env(key, value);
}
Expand Down

0 comments on commit 7fa9eea

Please sign in to comment.