Fixed build for x86_64-linux-android that doesn't support PCLMUL (#429)

master
Vyacheslav Gudkov 5 years ago committed by GitHub
parent 70aa3914c3
commit c70b59de55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      librocksdb-sys/build.rs

@ -103,13 +103,16 @@ fn build_rocksdb() {
// This is needed to enable hardware CRC32C. Technically, SSE 4.2 is // This is needed to enable hardware CRC32C. Technically, SSE 4.2 is
// only available since Intel Nehalem (about 2010) and AMD Bulldozer // only available since Intel Nehalem (about 2010) and AMD Bulldozer
// (about 2011). // (about 2011).
config.define("HAVE_PCLMUL", Some("1"));
config.define("HAVE_SSE42", Some("1")); config.define("HAVE_SSE42", Some("1"));
config.flag_if_supported("-msse2"); config.flag_if_supported("-msse2");
config.flag_if_supported("-msse4.1"); config.flag_if_supported("-msse4.1");
config.flag_if_supported("-msse4.2"); config.flag_if_supported("-msse4.2");
if !target.contains("android") {
config.define("HAVE_PCLMUL", Some("1"));
config.flag_if_supported("-mpclmul"); config.flag_if_supported("-mpclmul");
} }
}
if target.contains("darwin") { if target.contains("darwin") {
config.define("OS_MACOSX", Some("1")); config.define("OS_MACOSX", Some("1"));

Loading…
Cancel
Save