diff --git a/Cargo.toml b/Cargo.toml index 9e6d26d..5b203c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,9 @@ exclude = [ "test/**/*", ] +[workspace] +members = ["librocksdb-sys"] + [features] default = ["snappy", "lz4", "zstd", "zlib", "bzip2"] jemalloc = ["librocksdb-sys/jemalloc"] @@ -31,7 +34,7 @@ serde1 = ["serde"] [dependencies] libc = "0.2" -librocksdb-sys = { path = "librocksdb-sys", version = "0.6.0" } +librocksdb-sys = { path = "librocksdb-sys", version = "0.6.1" } serde = { version = "1", features = [ "derive" ], optional = true } [dev-dependencies] diff --git a/librocksdb-sys/Cargo.toml b/librocksdb-sys/Cargo.toml index 8bb0489..2046bd7 100644 --- a/librocksdb-sys/Cargo.toml +++ b/librocksdb-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "librocksdb-sys" -version = "0.6.0+6.28.2" +version = "0.6.1+6.28.2" edition = "2018" authors = ["Karl Hobley ", "Arkadiy Paronyan "] license = "MIT/Apache-2.0/BSD-3-Clause" diff --git a/librocksdb-sys/build.rs b/librocksdb-sys/build.rs index da8d097..1bdba89 100644 --- a/librocksdb-sys/build.rs +++ b/librocksdb-sys/build.rs @@ -1,3 +1,4 @@ +use std::path::Path; use std::{env, fs, path::PathBuf, process::Command}; fn link(name: &str, bundled: bool) { @@ -111,7 +112,7 @@ fn build_rocksdb() { // only available since Intel Nehalem (about 2010) and AMD Bulldozer // (about 2011). let target_feature = env::var("CARGO_CFG_TARGET_FEATURE").unwrap(); - let target_features: Vec<_> = target_feature.split(",").collect(); + let target_features: Vec<_> = target_feature.split(',').collect(); if target_features.contains(&"sse2") { config.flag_if_supported("-msse2"); } @@ -123,11 +124,9 @@ fn build_rocksdb() { config.define("HAVE_SSE42", Some("1")); } - if !target.contains("android") { - if target_features.contains(&"pclmulqdq") { - config.define("HAVE_PCLMUL", Some("1")); - config.flag_if_supported("-mpclmul"); - } + if !target.contains("android") && target_features.contains(&"pclmulqdq") { + config.define("HAVE_PCLMUL", Some("1")); + config.flag_if_supported("-mpclmul"); } } @@ -318,7 +317,9 @@ fn update_submodules() { } fn main() { - update_submodules(); + if !Path::new("rocksdb/AUTHORS").exists() { + update_submodules(); + } bindgen_rocksdb(); if !try_to_find_and_link_lib("ROCKSDB") {