Skip to content

Commit 803cfaa

Browse files
Bump rocksdb to 7.1.2 (tikv#626)
1 parent 5a3ced8 commit 803cfaa

File tree

7 files changed

+288
-274
lines changed

7 files changed

+288
-274
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ serde1 = ["serde"]
3434

3535
[dependencies]
3636
libc = "0.2"
37-
librocksdb-sys = { path = "librocksdb-sys", version = "0.6.1" }
37+
librocksdb-sys = { path = "librocksdb-sys", version = "0.7.0" }
3838
serde = { version = "1", features = [ "derive" ], optional = true }
3939

4040
[dev-dependencies]

librocksdb-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "librocksdb-sys"
3-
version = "0.6.1+6.28.2"
3+
version = "0.7.0+7.1.2"
44
edition = "2018"
55
authors = ["Karl Hobley <[email protected]>", "Arkadiy Paronyan <[email protected]>"]
66
license = "MIT/Apache-2.0/BSD-3-Clause"
@@ -31,7 +31,7 @@ bzip2-sys = { version = "0.1", default-features = false, optional = true }
3131

3232
[dev-dependencies]
3333
const-cstr = "0.3"
34-
uuid = { version = "0.8", features = ["v4"] }
34+
uuid = { version = "1.0", features = ["v4"] }
3535

3636
[build-dependencies]
3737
cc = { version = "1.0", features = ["parallel"] }

librocksdb-sys/build.rs

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,19 @@ fn build_rocksdb() {
184184
.collect::<Vec<&'static str>>();
185185

186186
// Add Windows-specific sources
187-
lib_sources.push("port/win/port_win.cc");
188-
lib_sources.push("port/win/env_win.cc");
189-
lib_sources.push("port/win/env_default.cc");
190-
lib_sources.push("port/win/win_logger.cc");
191-
lib_sources.push("port/win/io_win.cc");
192-
lib_sources.push("port/win/win_thread.cc");
187+
lib_sources.extend([
188+
"port/win/env_default.cc",
189+
"port/win/port_win.cc",
190+
"port/win/xpress_win.cc",
191+
"port/win/io_win.cc",
192+
"port/win/win_thread.cc",
193+
"port/win/env_win.cc",
194+
"port/win/win_logger.cc",
195+
]);
196+
197+
if cfg!(feature = "jemalloc") {
198+
lib_sources.push("port/win/win_jemalloc.cc");
199+
}
193200
}
194201

195202
config.define("ROCKSDB_SUPPORT_THREAD_LOCAL", None);
@@ -200,11 +207,19 @@ fn build_rocksdb() {
200207

201208
if target.contains("msvc") {
202209
config.flag("-EHsc");
210+
config.flag("-std:c++17");
203211
} else {
204212
config.flag(&cxx_standard());
205-
// this was breaking the build on travis due to
206-
// > 4mb of warnings emitted.
213+
// matches the flags in CMakeLists.txt from rocksdb
214+
config.flag("-Wsign-compare");
215+
config.flag("-Wshadow");
207216
config.flag("-Wno-unused-parameter");
217+
config.flag("-Wno-unused-variable");
218+
config.flag("-Woverloaded-virtual");
219+
config.flag("-Wnon-virtual-dtor");
220+
config.flag("-Wno-missing-field-initializers");
221+
config.flag("-Wno-strict-aliasing");
222+
config.flag("-Wno-invalid-offsetof");
208223
}
209224

210225
for file in lib_sources {
@@ -215,6 +230,7 @@ fn build_rocksdb() {
215230
config.file("build_version.cc");
216231

217232
config.cpp(true);
233+
config.flag_if_supported("-std=c++17");
218234
config.compile("librocksdb.a");
219235
}
220236

@@ -287,7 +303,7 @@ fn try_to_find_and_link_lib(lib_name: &str) -> bool {
287303
}
288304

289305
fn cxx_standard() -> String {
290-
env::var("ROCKSDB_CXX_STD").map_or("-std=c++11".to_owned(), |cxx_std| {
306+
env::var("ROCKSDB_CXX_STD").map_or("-std=c++17".to_owned(), |cxx_std| {
291307
if !cxx_std.starts_with("-std=") {
292308
format!("-std={}", cxx_std)
293309
} else {

librocksdb-sys/build_version.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
// The build script may replace these values with real values based
99
// on whether or not GIT is available and the platform settings
10-
static const std::string rocksdb_build_git_sha = "rocksdb_build_git_sha:3122cb435875d720fc3d23a48eb7c0fa89d869aa";
11-
static const std::string rocksdb_build_git_tag = "rocksdb_build_git_tag:6.28.2";
12-
static const std::string rocksdb_build_date = "rocksdb_build_date:2022-02-02 06:19:00";
10+
static const std::string rocksdb_build_git_sha = "rocksdb_build_git_sha:00724f43bcea4d82b371a3e43ebec91cfe8c11be";
11+
static const std::string rocksdb_build_git_tag = "rocksdb_build_git_tag:7.1.2" ;
12+
static const std::string rocksdb_build_date = "rocksdb_build_date:2022-04-21 06:19:00";
1313

1414
namespace ROCKSDB_NAMESPACE {
1515
static void AddProperty(std::unordered_map<std::string, std::string> *props, const std::string& name) {

librocksdb-sys/rocksdb

Submodule rocksdb updated 558 files

0 commit comments

Comments
 (0)