jemallocator/systest/build.rs
gnzlbg aa420aed20 Document jemalloc-sys; re-enable ctest; add stats feature
* document jemalloc-sys APIs
* document readme for crates.io
* add missing jemalloc apis
* re-enable ctest
* add stats feature
2018-08-13 12:04:37 +02:00

22 lines
578 B
Rust

extern crate ctest;
use std::env;
use std::path::PathBuf;
fn main() {
let root = PathBuf::from(env::var_os("DEP_JEMALLOC_ROOT").unwrap());
let mut cfg = ctest::TestGenerator::new();
cfg.header("jemalloc/jemalloc.h")
.include(root.join("include"))
.cfg("prefixed", None)
.fn_cname(|rust, link_name| link_name.unwrap_or(rust).to_string())
.skip_signededness(|c| c.ends_with("_t"));
if cfg!(target_os = "linux") {
cfg.skip_fn(|f| f == "malloc_usable_size");
}
cfg.generate("../jemalloc-sys/src/lib.rs", "all.rs");
}