|
|
|
@ -32,6 +32,25 @@ fn main() {
|
|
|
|
|
builder.define("ROCKSDB_IOURING_PRESENT", Some("1"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if target.contains("windows") {
|
|
|
|
|
link("rpcrt4", false);
|
|
|
|
|
link("shlwapi", false);
|
|
|
|
|
config.define("DWIN32", None);
|
|
|
|
|
config.define("OS_WIN", None);
|
|
|
|
|
config.define("_MBCS", None);
|
|
|
|
|
config.define("WIN64", None);
|
|
|
|
|
config.define("NOMINMAX", None);
|
|
|
|
|
config.define("ROCKSDB_WINDOWS_UTF8_FILENAMES", None);
|
|
|
|
|
|
|
|
|
|
if &target == "x86_64-pc-windows-gnu" {
|
|
|
|
|
// Tell MinGW to create localtime_r wrapper of localtime_s function.
|
|
|
|
|
config.define("_POSIX_C_SOURCE", Some("1"));
|
|
|
|
|
// Tell MinGW to use at least Windows Vista headers instead of the ones of Windows XP.
|
|
|
|
|
// (This is minimum supported version of rocksdb)
|
|
|
|
|
config.define("_WIN32_WINNT", Some("_WIN32_WINNT_VISTA"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
builder.compile("cozorocks");
|
|
|
|
|
println!("cargo:rustc-link-lib=static=rocksdb");
|
|
|
|
|
println!("cargo:rustc-link-lib=static=zstd");
|
|
|
|
|