From 961abc8e45b30b43cad3659305d5703eb349fc31 Mon Sep 17 00:00:00 2001 From: Zaidoon Abd Al Hadi <43054535+zaidoon1@users.noreply.github.com> Date: Mon, 25 Mar 2024 05:29:26 -0400 Subject: Revert portable feature as it doesn't do anything (#871) * Revert "Update README.md with a new section for the portable feature" This reverts commit 0d8804a5d668989fc450205e990204bf72427650. * Revert "Add portable feature for RocksDB build" This reverts commit eeab5d83250c4aaa8bfc3a17b15f9bf67b77b6cc. --------- Co-authored-by: zaidoon --- Cargo.toml | 1 - README.md | 12 ------------ librocksdb-sys/Cargo.toml | 1 - librocksdb-sys/build.rs | 4 ---- 4 files changed, 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e5d664a..f7a0d22 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,6 @@ bzip2 = ["librocksdb-sys/bzip2"] rtti = ["librocksdb-sys/rtti"] multi-threaded-cf = [] serde1 = ["serde"] -portable = ["librocksdb-sys/portable"] [dependencies] libc = "0.2" diff --git a/README.md b/README.md index e7c574c..df58eb1 100644 --- a/README.md +++ b/README.md @@ -54,21 +54,9 @@ the crate feature `multi-threaded-cf`, which makes this binding's data structures use `RwLock` by default. Alternatively, you can directly create `DBWithThreadMode` without enabling the crate feature. -## Portable builds - -RocksDB's build, unlike Cargo, will default to setting `-march=native`, which -generate code that fully takes advantage of build machine's CPU's features. -This may create a binary that isn't compatible with other CPUs on the same -architecture. For example, building on a machine with AVX512 support will create -a binary that fails with `SIGILL` on machines without AVX512. - -Set the `portable` feature on this crate to pass `PORTABLE=1` to RocksDB's build, -which will create a portable binary at the cost of some performance. - ## Switch between /MT or /MD run time library (Only for Windows) The feature `mt_static` will request the library to be built with [/MT](https://learn.microsoft.com/en-us/cpp/build/reference/md-mt-ld-use-run-time-library?view=msvc-170) flag, which results in library using the static version of the run-time library. *This can be useful in case there's a conflict in the dependecy tree between different run-time versions.* - diff --git a/librocksdb-sys/Cargo.toml b/librocksdb-sys/Cargo.toml index 2f64b64..d15746b 100644 --- a/librocksdb-sys/Cargo.toml +++ b/librocksdb-sys/Cargo.toml @@ -24,7 +24,6 @@ zstd = ["zstd-sys"] zlib = ["libz-sys"] bzip2 = ["bzip2-sys"] rtti = [] -portable = [] [dependencies] libc = "0.2" diff --git a/librocksdb-sys/build.rs b/librocksdb-sys/build.rs index ca463f9..7f12fc5 100644 --- a/librocksdb-sys/build.rs +++ b/librocksdb-sys/build.rs @@ -90,10 +90,6 @@ fn build_rocksdb() { config.define("USE_RTTI", Some("1")); } - if cfg!(feature = "portable") { - config.define("PORTABLE", Some("1")); - } - config.include("."); config.define("NDEBUG", Some("1")); -- cgit v1.2.3-70-g09d2