Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Support old CPUs (#22)
Browse files Browse the repository at this point in the history
* build: set `PORTABLE = ON` for every target

* build: allow setting PORTABLE=OFF via env var

* rocksdb-sys: bump version to 0.5.3
  • Loading branch information
ordian authored Oct 9, 2018
1 parent f1252c8 commit 578c41e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rocksdb-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "parity-rocksdb-sys"
version = "0.5.2"
version = "0.5.3"
authors = ["Tyler Neely <t@jujit.su>", "David Greenberg <dsg123456789@gmail.com>", "Parity Technologies <admin@parity.io>"]
license = "MIT/Apache-2.0/BSD-3-Clause"
description = "Native bindings to librocksdb"
Expand Down
8 changes: 7 additions & 1 deletion rocksdb-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ fn main() {
let target_arch = env::var("CARGO_CFG_TARGET_ARCH")
.expect("CARGO_CFG_TARGET_ARCH is set by cargo.");

if target_arch == "arm" || target_arch == "aarch64" {
// Added to support old CPUs
// see https://github.com/paritytech/parity-ethereum/issues/9684
let portable = match &*env::var("PORTABLE").unwrap_or("ON".to_owned()) {
"OFF" => false,
_ => true,
};
if portable {
cfg.define("PORTABLE", "ON");
}

Expand Down

0 comments on commit 578c41e

Please sign in to comment.