|
|
|
@ -144,32 +144,32 @@ fn build_rocksdb() { |
|
|
|
|
// config.flag("-march=haswell");
|
|
|
|
|
// the flag has been moved to the darwin. openbsd, freebsd and linux cases below
|
|
|
|
|
} |
|
|
|
|
if !target.contains("openbsd") { |
|
|
|
|
if !target.contains("darwin") && !target.contains("linux") { |
|
|
|
|
config.include("rocksdb/plugin/openssl/include"); |
|
|
|
|
lib_sources.push("plugin/openssl/openssl_provider.cc"); |
|
|
|
|
let dir = env::var("CARGO_MANIFEST_DIR").unwrap(); |
|
|
|
|
println!( |
|
|
|
|
"cargo:rustc-link-search=dependency={}", |
|
|
|
|
Path::new(&dir) |
|
|
|
|
//.join("rocksdb/plugin/ippcp/library/macos/lib")
|
|
|
|
|
.display() |
|
|
|
|
); |
|
|
|
|
println!("cargo:rustc-link-lib=static=crypto"); |
|
|
|
|
} else { |
|
|
|
|
// on macos and linux we use the IPPCP plugin of rocksdb for the crypto (the lib is precompiled)
|
|
|
|
|
config.include("rocksdb/plugin/ippcp/library/include"); |
|
|
|
|
lib_sources.push("plugin/ippcp/ippcp_provider.cc"); |
|
|
|
|
let dir = env::var("CARGO_MANIFEST_DIR").unwrap(); |
|
|
|
|
println!( |
|
|
|
|
"cargo:rustc-link-search=native={}", |
|
|
|
|
Path::new(&dir) |
|
|
|
|
.join("rocksdb/plugin/ippcp/library/macos/lib") |
|
|
|
|
.display() |
|
|
|
|
); |
|
|
|
|
println!("cargo:rustc-link-lib=static=ippcp"); |
|
|
|
|
if !target.contains("openbsd") { |
|
|
|
|
if !target.contains("darwin") && !target.contains("linux") { |
|
|
|
|
config.include("rocksdb/plugin/openssl/include"); |
|
|
|
|
lib_sources.push("plugin/openssl/openssl_provider.cc"); |
|
|
|
|
let dir = env::var("CARGO_MANIFEST_DIR").unwrap(); |
|
|
|
|
println!( |
|
|
|
|
"cargo:rustc-link-search=dependency={}", |
|
|
|
|
Path::new(&dir) |
|
|
|
|
//.join("rocksdb/plugin/ippcp/library/macos/lib")
|
|
|
|
|
.display() |
|
|
|
|
); |
|
|
|
|
println!("cargo:rustc-link-lib=static=crypto"); |
|
|
|
|
} else { |
|
|
|
|
// on macos and linux we use the IPPCP plugin of rocksdb for the crypto (the lib is precompiled)
|
|
|
|
|
config.include("rocksdb/plugin/ippcp/library/include"); |
|
|
|
|
lib_sources.push("plugin/ippcp/ippcp_provider.cc"); |
|
|
|
|
let dir = env::var("CARGO_MANIFEST_DIR").unwrap(); |
|
|
|
|
println!( |
|
|
|
|
"cargo:rustc-link-search=native={}", |
|
|
|
|
Path::new(&dir) |
|
|
|
|
.join("rocksdb/plugin/ippcp/library/macos/lib") |
|
|
|
|
.display() |
|
|
|
|
); |
|
|
|
|
println!("cargo:rustc-link-lib=static=ippcp"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if target.contains("apple-ios") { |
|
|
|
|
config.define("OS_MACOSX", None); |
|
|
|
|
config.define("IOS_CROSS_COMPILE", None); |
|
|
|
@ -232,8 +232,9 @@ if !target.contains("openbsd") { |
|
|
|
|
config.define("_REENTRANT", None); |
|
|
|
|
config.include("rocksdb/plugin/openssl/include"); |
|
|
|
|
lib_sources.push("plugin/openssl/openssl_provider.cc"); |
|
|
|
|
let dir = env::var("CARGO_MANIFEST_DIR").unwrap(); |
|
|
|
|
println!("cargo:rustc-link-lib=static=crypto"); |
|
|
|
|
// let dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
|
|
|
|
println!("cargo:rustc-link-arg=-lcrypto"); |
|
|
|
|
// println!("cargo:rustc-link-lib=static=crypto");
|
|
|
|
|
} else if target.contains("windows") { |
|
|
|
|
link("rpcrt4", false); |
|
|
|
|
link("shlwapi", false); |
|
|
|
|