Add feature wrapping --enable-fill to support redzones for valgrind

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-10-23 08:08:50 +00:00 committed by June 🍓🦴
parent c32af15f3b
commit a84bd3f476
3 changed files with 7 additions and 0 deletions

View file

@ -39,6 +39,7 @@ debug = []
background_threads_runtime_support = []
background_threads = [ "background_threads_runtime_support" ]
stats = []
fill = []
unprefixed_malloc_on_supported_platforms = []
disable_initial_exec_tls = []
disable_cache_oblivious = []

View file

@ -294,6 +294,11 @@ fn main() {
cmd.arg("--disable-cache-oblivious");
}
if env::var("CARGO_FEATURE_FILL").is_ok() {
info!("CARGO_FEATURE_FILL set");
cmd.arg("--enable-fill");
}
cmd.arg(format!("--host={}", gnu_target(&target)));
cmd.arg(format!("--build={}", gnu_target(&host)));
cmd.arg(format!("--prefix={}", out_dir.display()));

View file

@ -50,6 +50,7 @@ alloc_trait = []
profiling = ["tikv-jemalloc-sys/profiling"]
debug = ["tikv-jemalloc-sys/debug"]
stats = ["tikv-jemalloc-sys/stats"]
fill = ["tikv-jemalloc-sys/fill"]
background_threads_runtime_support = ["tikv-jemalloc-sys/background_threads_runtime_support"]
background_threads = ["tikv-jemalloc-sys/background_threads"]
unprefixed_malloc_on_supported_platforms = ["tikv-jemalloc-sys/unprefixed_malloc_on_supported_platforms"]