Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ secure = ["libmimalloc-sys2/secure"]
override = ["libmimalloc-sys2/override"]
local_dynamic_tls = ["libmimalloc-sys2/local_dynamic_tls"]
no_thp = ["libmimalloc-sys2/no_thp"]
no_opt_arch = ["libmimalloc-sys2/no_opt_arch"]
extended = ["libmimalloc-sys2/extended"]
skip_collect_on_exit = ["libmimalloc-sys2/skip_collect_on_exit"]

Expand Down
2 changes: 2 additions & 0 deletions libmimalloc-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ arena = []
local_dynamic_tls = []
no_thp = []
skip_collect_on_exit = []
# turn off `MI_OPT_ARCH`, default is `ON`
no_opt_arch = []

# Show `extended` on docs.rs since it's the full API surface.
[package.metadata.docs.rs]
Expand Down
4 changes: 4 additions & 0 deletions libmimalloc-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ fn main() {
cmake_config.define("MI_TRACK_ETW", "ON");
}

if env::var_os("CARGO_FEATURE_NO_OPT_ARCH").is_some() {
cmake_config.define("MI_OPT_ARCH", "OFF");
}

// it's complicated to link ucrt in debug mode on windows
if profile == "debug" && target_env != "msvc" {
cmake_config
Expand Down
Loading