From c70b59de551916bafa68e60a46b9c1c188c80baa Mon Sep 17 00:00:00 2001 From: Vyacheslav Gudkov Date: Tue, 19 May 2020 14:26:57 +0300 Subject: [PATCH] Fixed build for x86_64-linux-android that doesn't support PCLMUL (#429) --- librocksdb-sys/build.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/librocksdb-sys/build.rs b/librocksdb-sys/build.rs index 4be4a1e..0a0fb54 100644 --- a/librocksdb-sys/build.rs +++ b/librocksdb-sys/build.rs @@ -103,12 +103,15 @@ fn build_rocksdb() { // This is needed to enable hardware CRC32C. Technically, SSE 4.2 is // only available since Intel Nehalem (about 2010) and AMD Bulldozer // (about 2011). - config.define("HAVE_PCLMUL", Some("1")); config.define("HAVE_SSE42", Some("1")); config.flag_if_supported("-msse2"); config.flag_if_supported("-msse4.1"); config.flag_if_supported("-msse4.2"); - config.flag_if_supported("-mpclmul"); + + if !target.contains("android") { + config.define("HAVE_PCLMUL", Some("1")); + config.flag_if_supported("-mpclmul"); + } } if target.contains("darwin") {