|
|
@ -118,24 +118,19 @@ fn build_rocksdb() { |
|
|
|
} |
|
|
|
} |
|
|
|
if target_features.contains(&"sse4.2") { |
|
|
|
if target_features.contains(&"sse4.2") { |
|
|
|
config.flag_if_supported("-msse4.2"); |
|
|
|
config.flag_if_supported("-msse4.2"); |
|
|
|
config.define("HAVE_SSE42", Some("1")); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
// Pass along additional target features as defined in
|
|
|
|
// Pass along additional target features as defined in
|
|
|
|
// build_tools/build_detect_platform.
|
|
|
|
// build_tools/build_detect_platform.
|
|
|
|
if target_features.contains(&"avx2") { |
|
|
|
if target_features.contains(&"avx2") { |
|
|
|
config.flag_if_supported("-mavx2"); |
|
|
|
config.flag_if_supported("-mavx2"); |
|
|
|
config.define("HAVE_AVX2", Some("1")); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if target_features.contains(&"bmi1") { |
|
|
|
if target_features.contains(&"bmi1") { |
|
|
|
config.flag_if_supported("-mbmi"); |
|
|
|
config.flag_if_supported("-mbmi"); |
|
|
|
config.define("HAVE_BMI", Some("1")); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if target_features.contains(&"lzcnt") { |
|
|
|
if target_features.contains(&"lzcnt") { |
|
|
|
config.flag_if_supported("-mlzcnt"); |
|
|
|
config.flag_if_supported("-mlzcnt"); |
|
|
|
config.define("HAVE_LZCNT", Some("1")); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if !target.contains("android") && target_features.contains(&"pclmulqdq") { |
|
|
|
if !target.contains("android") && target_features.contains(&"pclmulqdq") { |
|
|
|
config.define("HAVE_PCLMUL", Some("1")); |
|
|
|
|
|
|
|
config.flag_if_supported("-mpclmul"); |
|
|
|
config.flag_if_supported("-mpclmul"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|