Add disable_initial_exec_tls feature
This allows libraries that link against jemalloc to be dlopened. See https://github.com/jemalloc/jemalloc/issues/937 https://github.com/jemalloc/jemalloc/blob/dev/INSTALL.md for detailed explanation of the feature.
This commit is contained in:
parent
c23204616d
commit
ea444b8758
|
@ -51,6 +51,7 @@ stats = ["jemalloc-sys/stats"]
|
|||
background_threads_runtime_support = ["jemalloc-sys/background_threads_runtime_support"]
|
||||
background_threads = ["jemalloc-sys/background_threads"]
|
||||
unprefixed_malloc_on_supported_platforms = ["jemalloc-sys/unprefixed_malloc_on_supported_platforms"]
|
||||
disable_initial_exec_tls = ["jemalloc-sys/disable_initial_exec_tls"]
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = [ "alloc_trait" ]
|
||||
|
|
|
@ -45,6 +45,7 @@ background_threads_runtime_support = []
|
|||
background_threads = [ "background_threads_runtime_support" ]
|
||||
stats = []
|
||||
unprefixed_malloc_on_supported_platforms = []
|
||||
disable_initial_exec_tls = []
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
rustdoc-args = [ "--cfg jemallocator_docs" ]
|
||||
|
|
|
@ -292,6 +292,11 @@ fn main() {
|
|||
cmd.arg("--enable-stats");
|
||||
}
|
||||
|
||||
if env::var("CARGO_FEATURE_DISABLE_INITIAL_EXEC_TLS").is_ok() {
|
||||
info!("CARGO_FEATURE_DISABLE_INITIAL_EXEC_TLS set");
|
||||
cmd.arg("--disable-initial-exec-tls");
|
||||
}
|
||||
|
||||
cmd.arg(format!("--host={}", gnu_target(&target)));
|
||||
cmd.arg(format!("--build={}", gnu_target(&host)));
|
||||
cmd.arg(format!("--prefix={}", out_dir.display()));
|
||||
|
|
Loading…
Reference in New Issue