Skip to content

Commit 0759915

Browse files
authored
Merge pull request #38 from tvbeat/local_dynamic_tls
Introduce local_dynamic_tls feature
2 parents ce42f71 + 801ce4b commit 0759915

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ libmimalloc-sys = { path = "libmimalloc-sys", version = "0.1.17", default-featur
2727
default = ["secure"]
2828
secure = ["libmimalloc-sys/secure"]
2929
override = ["libmimalloc-sys/override"]
30+
local_dynamic_tls = ["libmimalloc-sys/local_dynamic_tls"]

libmimalloc-sys/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ cmake = "0.1"
2020
secure = []
2121
override = []
2222
extended = ["cty"]
23+
local_dynamic_tls = []
2324

2425
# Show `extended` on docs.rs since it's the full API surface.
2526
[package.metadata.docs.rs]

libmimalloc-sys/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ fn main() {
7878
cfg = cfg.define("MI_SECURE", "OFF");
7979
}
8080

81+
if cfg!(feature = "local_dynamic_tls") {
82+
cfg = cfg.define("MI_LOCAL_DYNAMIC_TLS", "ON");
83+
} else {
84+
cfg = cfg.define("MI_LOCAL_DYNAMIC_TLS", "OFF");
85+
}
86+
8187
// Inject MI_DEBUG=0
8288
// This set mi_option_verbose and mi_option_show_errors options to false.
8389
cfg = cfg.define("mi_defines", "MI_DEBUG=0");

0 commit comments

Comments
 (0)