diff options
author | Blaž Hrastnik | 2021-07-12 08:48:45 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-07-14 01:00:05 +0000 |
commit | e6bf6a8f285f4d11eb7be0b745b70d37e1dd6dfa (patch) | |
tree | 0111950d591052cd46029732d67d0aef574a0bfe | |
parent | a7fa5621ce313e4e7d16621cf04b218d1ba1c3fa (diff) |
Build each grammar in it's own src dir
Windows places temporary files in the current dir, so compiling in
parallel caused conflicts.
-rw-r--r-- | helix-syntax/build.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/helix-syntax/build.rs b/helix-syntax/build.rs index b73658d1..ff82c892 100644 --- a/helix-syntax/build.rs +++ b/helix-syntax/build.rs @@ -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); } |