rust: Detect debug builds using PROFILE env var in build script
Fixes #757
This commit is contained in:
parent
84433494a5
commit
87fd2f5ca3
1 changed files with 2 additions and 2 deletions
|
|
@ -21,8 +21,8 @@ fn main() {
|
|||
|
||||
let mut config = cc::Build::new();
|
||||
|
||||
println!("cargo:rerun-if-env-changed=DEBUG");
|
||||
if env::var("DEBUG").map(|s| s == "true").unwrap_or(false) {
|
||||
println!("cargo:rerun-if-env-changed=PROFILE");
|
||||
if env::var("PROFILE").map_or(false, |s| s == "debug") {
|
||||
config.define("TREE_SITTER_TEST", "");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue