summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-06-05 00:20:33 +0000
committerBlaž Hrastnik2021-06-05 00:20:33 +0000
commit8f78c0c61291d81180ca0549b4df1fada6a13498 (patch)
tree5de9a4849d69309e9e28bb82536a5396e9cdc5df
parent01dd7b570a692ca59d34c74806e7fcdd48e60b21 (diff)
syntax: Disable explicit debug/opt_level passing
cc-rs will already do the right thing and figure out the flags. Fixes #34
-rw-r--r--helix-syntax/build.rs15
1 files changed, 1 insertions, 14 deletions
diff --git a/helix-syntax/build.rs b/helix-syntax/build.rs
index 447fa9c3..fd88138b 100644
--- a/helix-syntax/build.rs
+++ b/helix-syntax/build.rs
@@ -3,14 +3,6 @@ use std::{env, fs};
use std::sync::mpsc::channel;
-fn get_opt_level() -> u32 {
- env::var("OPT_LEVEL").unwrap().parse::<u32>().unwrap()
-}
-
-fn get_debug() -> bool {
- env::var("DEBUG").unwrap() == "true"
-}
-
fn collect_tree_sitter_dirs(ignore: &[String]) -> Vec<String> {
let mut dirs = Vec::new();
for entry in fs::read_dir("languages").unwrap().flatten() {
@@ -58,10 +50,7 @@ fn build_c(files: Vec<String>, language: &str) {
.file(&file)
.include(PathBuf::from(file).parent().unwrap())
.pic(true)
- .opt_level(get_opt_level())
- .debug(get_debug())
- .warnings(false)
- .flag_if_supported("-std=c99");
+ .warnings(false);
}
build.compile(&format!("tree-sitter-{}-c", language));
}
@@ -73,8 +62,6 @@ fn build_cpp(files: Vec<String>, language: &str) {
.file(&file)
.include(PathBuf::from(file).parent().unwrap())
.pic(true)
- .opt_level(get_opt_level())
- .debug(get_debug())
.warnings(false)
.cpp(true);
}