Skip to content

Commit

Permalink
Merge pull request #74 from EmbarkStudios/debug-in-debug
Browse files Browse the repository at this point in the history
Add `debug_in_debug` feature
  • Loading branch information
octavonce authored Dec 25, 2021
2 parents 697f23f + 2f6b2f6 commit d30e026
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ default = ["secure"]
secure = ["libmimalloc-sys/secure"]
override = ["libmimalloc-sys/override"]
debug = ["libmimalloc-sys/debug"]
debug_in_debug = ["libmimalloc-sys/debug_in_debug"]
local_dynamic_tls = ["libmimalloc-sys/local_dynamic_tls"]
1 change: 1 addition & 0 deletions libmimalloc-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cc = "1.0"
[features]
secure = []
debug = []
debug_in_debug = []
override = []
extended = ["cty"]
local_dynamic_tls = []
Expand Down
4 changes: 3 additions & 1 deletion libmimalloc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ fn main() {
}
}

if env::var_os("CARGO_FEATURE_DEBUG").is_some() {
if env::var_os("CARGO_FEATURE_DEBUG").is_some()
|| (env::var_os("CARGO_FEATURE_DEBUG_IN_DEBUG").is_some() && cfg!(debug_assertions))
{
build.define("MI_DEBUG", "3");
build.define("MI_SHOW_ERRORS", "1");
} else {
Expand Down

0 comments on commit d30e026

Please sign in to comment.