Unverified Commit 7a8dd731 authored by yiwu-arbug's avatar yiwu-arbug Committed by GitHub

Add jemalloc-sys dependency when jemalloc is enabled (#320)

When jemalloc feature is on, add jemalloc-sys dependency and pass its lib path to rocksdb.

Tested on ubuntu with libjemalloc-dev uninstalled.
Signed-off-by: 's avatarYi Wu <yiwu@pingcap.com>
parent 6f2c6320
......@@ -14,7 +14,7 @@ tempdir = "0.3"
[features]
default = []
jemalloc = []
jemalloc = ["jemalloc-sys"]
# portable doesn't require static link, though it's meaningless
# when not using with static-link right now in this crate.
portable = ["libtitan_sys/portable"]
......@@ -24,6 +24,10 @@ sse = ["libtitan_sys/sse"]
cc = "1.0.3"
cmake = "0.1"
[dependencies.jemalloc-sys]
version = ">= 0.1.8"
optional = true
[dependencies.libz-sys]
version = "1.0.25"
features = ["static"]
......
......@@ -78,7 +78,7 @@ fn build_rocksdb() -> Build {
let mut cfg = Config::new("rocksdb");
if cfg!(feature = "jemalloc") {
cfg.define("WITH_JEMALLOC", "ON");
cfg.register_dep("JEMALLOC").define("WITH_JEMALLOC", "ON");
}
if cfg!(feature = "portable") {
cfg.define("PORTABLE", "ON");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment