aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authoryvt2022-07-20 14:56:26 +0000
committerBlaž Hrastnik2022-08-02 03:04:09 +0000
commit6d16d2cbc910f2e3e4131fae41a8cd67c287e6a5 (patch)
tree41055e4b1e0e27fa2105bfba767502f32ee891a7 /helix-term
parentf6f054ae5b091a608233b1e3d105e1032a8d676b (diff)
feat: support grammar cross-compilation
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/build.rs3
-rw-r--r--helix-term/src/main.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/helix-term/build.rs b/helix-term/build.rs
index 974f4b5e..74c35a3a 100644
--- a/helix-term/build.rs
+++ b/helix-term/build.rs
@@ -19,7 +19,8 @@ fn main() {
if std::env::var("HELIX_DISABLE_AUTO_GRAMMAR_BUILD").is_err() {
fetch_grammars().expect("Failed to fetch tree-sitter grammars");
- build_grammars().expect("Failed to compile tree-sitter grammars");
+ build_grammars(Some(std::env::var("TARGET").unwrap()))
+ .expect("Failed to compile tree-sitter grammars");
}
println!("cargo:rerun-if-changed=../runtime/grammars/");
diff --git a/helix-term/src/main.rs b/helix-term/src/main.rs
index eb186d78..83af7588 100644
--- a/helix-term/src/main.rs
+++ b/helix-term/src/main.rs
@@ -108,7 +108,7 @@ FLAGS:
}
if args.build_grammars {
- helix_loader::grammar::build_grammars()?;
+ helix_loader::grammar::build_grammars(None)?;
return Ok(0);
}